Page 1 of 1
Start another app as adminstrator
Posted: Fri Aug 17, 2012 3:27 pm
by Matt
So im using the application updater that CodenStuff made, but the updater needs admin permissions to complete the update.
So the question is, how do i start another app as adminstrator from my vb app?
thanks.
Re: Start another app as adminstrator
Posted: Fri Aug 17, 2012 3:56 pm
by Filip
I think that running app in-code isn't possible since it would be security brench..
Re: Start another app as adminstrator
Posted: Fri Aug 17, 2012 4:46 pm
by Codex
Try using:
Code: Select allDim p As New Process()
p.StartInfo.Verb = "runas"
Re: Start another app as adminstrator
Posted: Fri Aug 17, 2012 4:52 pm
by Matt
Codex wrote:Try using:
Code: Select allDim p As New Process()
p.StartInfo.Verb = "runas"
and i should replace runas with the path of the application i want to run as admin?
Re: Start another app as adminstrator
Posted: Fri Aug 17, 2012 5:10 pm
by DeveloperJacob
If you open your updater project files in vs2010 then go to My Project -> Application and click on "View Windows Settings".
Then replace:
with:
Then if you startup your Updater with process.start it should ask for an Administrator password.
Re: Start another app as adminstrator
Posted: Fri Aug 17, 2012 7:29 pm
by Matt
DeveloperJacob wrote:If you open your updater project files in vs2010 then go to My Project -> Application and click on "View Windows Settings".
Then replace:
with:
Then if you startup your Updater with process.start it should ask for an Administrator password.
Yeah, i've known of that for a long time, and i have done it do the updater but it still wont start as adminstrator.
Re: Start another app as adminstrator
Posted: Wed Aug 22, 2012 2:27 am
by Livengood
You can do it through the program itself where it will start up even if you dont do that.
Re: Start another app as adminstrator
Posted: Wed Aug 22, 2012 9:07 pm
by Matt
Livengood wrote:You can do it through the program itself where it will start up even if you dont do that.
How exactly would I do that?