471,349 Members | 1,266 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,349 software developers and data experts.

Launch an application as Administrator

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
Jun 27 '08 #1
5 4628

<na***@community.nospamwrote in message
news:h5********************************@4ax.com...
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.

Jun 27 '08 #2
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.
Ar****@Arnold.comwrote:
>
<na***@community.nospamwrote in message
news:h5********************************@4ax.com.. .
>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.
Jun 27 '08 #3

<na***@community.nospamwrote in message
news:4e********************************@4ax.com...
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.

Jun 27 '08 #4
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
Jun 27 '08 #5

<na***@community.nospamwrote in message
news:14********************************@4ax.com...
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...=Google+Search

Jun 27 '08 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by Bob Bedford | last post: by
8 posts views Thread by Marcus | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.