473,322 Members | 1,523 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 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 4716

<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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Bob Bedford | last post by:
I've a script that must "launch" an other script on some situations. firstscript.php: .... If ($newarticle) //launch secondscript.php .... The "secondscript.php" may take quite long, and is...
1
by: Michael Howes | last post by:
I have a c# windows form that talks to a web service on a server that then can talk to multiple "agents" on different machines using web service calls. I want to be able to launch an application...
5
by: GrantS | last post by:
Hi I am trying to use ShellExecute to launch an application to display a certain file. The variation on the theme is that I need to be able to specify the application to launch and not simply...
1
by: Chris | last post by:
Does anyone know how to programmatically launch the ODBC Data Source Administrator dialog? Thanks.
4
by: Joe | last post by:
I created a CustomAction for this but I don't think I have it in the right place. I tried both Install and Commit but neither allow it to get to the final screen. Are there any examples of this...
8
by: Marcus | last post by:
I have this application I have made that I launch when the user logs into Windows XP. I would like to delay the launch of the application so that it starts 1 minute after the user has logged in. ...
5
by: cooltoriz | last post by:
Hello there, I am not asking how to impersonate a process within C# windows application. I already know that, in C# v2.0, you can easily achieve it using ProcessStartInfo. You can run a process...
7
by: dongarbage | last post by:
Hi there, I'm very new to activex controls and c# programming. I'm writing a c# application and I want it to be invoked when my users click a button on a web page. Its an application with a...
1
BezerkRogue
by: BezerkRogue | last post by:
I have created a VB Script to synchronize software versions and then launch an application on the system it is run against. The script runs and generates no errors but will not launch the second...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.