Launch an application as Administrator

N

nagar

I'm using the Process.Start method to launch an application from C#.
How can I launch the App as Administrator in Windows Vista?
Thanks.
Andrea
 
M

Mr. Arnold

I'm using the Process.Start method to launch an application from C#.
How can I launch the App as Administrator in Windows Vista?

You can set the program to have Admin privileges by using Run As
Administrator with Vista UAC manifest that the program will present the
credentials to Vista, look it up use Google.
 
N

nagar

Thanks for the quick reply Arnold. Can you be a bit more precise,
please?
I don't have the username and password of the administrator. I've
created a shortcut launch application and I would like it to display
the UAC prompt asking for the permission to raise privileges. Do you
have an example to do that?
Thanks.
Andrea

On Sat, 21 Jun 2008 02:47:13 -0400, "Mr. Arnold" <MR.
 
M

Mr. Arnold

Thanks for the quick reply Arnold. Can you be a bit more precise,
please?
I don't have the username and password of the administrator. I've
created a shortcut launch application and I would like it to display
the UAC prompt asking for the permission to raise privileges. Do you
have an example to do that?

If you have created a short-cut for the start application, the Run as Admin
should/might be be there on the short-cut off of Properties/Advanced Button
to set it permanently. If someone runs the application with standard user
rights, then the user must know an Admin account with the user-id and psw.
An Admin running the application won't be asked for credentials but will be
prompted to allow or dis-allow.

The one you should be worried about is the application you're trying to
start form the application with your Start . Net Net statement and its
credentials to start and execute.

Again, use Google and look up *how to use the UAC manifest from a .Net
program to give elevated credentials for an .Net program. There are plenty
of information out there concerning this.
 
N

nagar

I'm sorry but this is not very clear to me, yet.
I don't need to start my application with elevated rights but I need
to start another application from inside my application with elevated
rights.
I don't want to store the password inside my app. Basically I would
like to replicate the functionality of the "Start as admin" item in
the context menu that appears when you right click on an executable
file in Windows Vista.

I just need some C# sample code do it. Can you point me to it?
Thanks.
Andrea
 
M

Mr. Arnold

I'm sorry but this is not very clear to me, yet.
I don't need to start my application with elevated rights but I need
to start another application from inside my application with elevated
rights.
I don't want to store the password inside my app. Basically I would
like to replicate the functionality of the "Start as admin" item in
the context menu that appears when you right click on an executable
file in Windows Vista.

I just need some C# sample code do it. Can you point me to it?

http://www.google.com/search?hl=en&q=how+to+program+using+Vista+Manifest&btnG=Google+Search
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top