472,958 Members | 2,017 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,958 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 4695

<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: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
2
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

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.