.net - How to force my dot net application to run as administrator just after installing msi? -


i want run windows dot net application administrator after after installing msi . please help

if msi require administrative privileges can directly run application new system.diagnostics.procesas overriding installer.onafterinstall method. application run under same context.

if have force administrative context can same way create instance of system.diagnostics.process class , set verb property "runas".

system.diagnostics.process process.verb = "runas"; 

if need know installed location of application take @ approach: getting application path during installation

edit

a approach available on codeproject: launching application after install


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -