Start another app as adminstrator

If you need help with a project or need to know how to do something specific in VB.NET then please ask your questions in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
8 posts Page 1 of 1
Contributors
User avatar
Matt
VIP - Donator
VIP - Donator
Posts: 158
Joined: Fri Jul 22, 2011 5:44 pm

Start another app as adminstrator
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.
Formerly known as RyggTonning.
PM me if you have any business proposals or similar.
Filip
Coding Guru
Coding Guru
Posts: 833
Joined: Wed Jan 05, 2011 3:59 pm

Re: Start another app as adminstrator
Filip
I think that running app in-code isn't possible since it would be security brench..
CodenStuff wrote:
Nope, it's just your sick and dirty mind. You sick twisted warped little pervo :D
User avatar
Codex
Coding God
Coding God
Posts: 2028
Joined: Wed Mar 31, 2010 5:50 pm

Re: Start another app as adminstrator
Codex
Try using:
Code: Select all
Dim p As New Process()
p.StartInfo.Verb = "runas"
We shall let the revolution begin.. the revolution for freedom, freedom against censorship. We shall fight in the fields and in the streets, we shall fight in the hills; we shall never surrender
User avatar
Matt
VIP - Donator
VIP - Donator
Posts: 158
Joined: Fri Jul 22, 2011 5:44 pm

Re: Start another app as adminstrator
Matt
Codex wrote:
Try using:
Code: Select all
Dim 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?
Formerly known as RyggTonning.
PM me if you have any business proposals or similar.
User avatar
DeveloperJacob
VIP - Donator
VIP - Donator
Posts: 87
Joined: Sun May 27, 2012 12:40 pm

If you open your updater project files in vs2010 then go to My Project -> Application and click on "View Windows Settings".
Then replace:
Code: Select all
level="asInvoker"
with:
Code: Select all
level="requireAdministrator"
Then if you startup your Updater with process.start it should ask for an Administrator password.
Image
User avatar
Matt
VIP - Donator
VIP - Donator
Posts: 158
Joined: Fri Jul 22, 2011 5:44 pm

Re: Start another app as adminstrator
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:
Code: Select all
level="asInvoker"
with:
Code: Select all
level="requireAdministrator"
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.
Formerly known as RyggTonning.
PM me if you have any business proposals or similar.
User avatar
Livengood
Serious Programmer
Serious Programmer
Posts: 445
Joined: Tue Feb 16, 2010 6:24 am

You can do it through the program itself where it will start up even if you dont do that.
Image
User avatar
Matt
VIP - Donator
VIP - Donator
Posts: 158
Joined: Fri Jul 22, 2011 5:44 pm

Re: Start another app as adminstrator
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?
Formerly known as RyggTonning.
PM me if you have any business proposals or similar.
8 posts Page 1 of 1
Return to “Coding Help & Support”