All Questions

668
votes
10answers
335481 views

How do I force my .NET application to run as administrator?

Once my program is installed on a client machine, how do I force my program to run as an administrator on Windows 7?
167
votes
9answers
204980 views

How can I auto-elevate my batch file, so that it requests from UAC administrator rights if required?

I want my batch file to only run elevated. If not elevated, provide an option for the user to relaunch batch as elevated. I'm writing a batch file to set a system variable, copy two files to a Progra...
36
votes
7answers
59425 views

How to run python script with elevated privilege on windows

I am writing a pyqt application which require to execute admin task. I would prefer to start my script with elevate privilege. I am aware that this question is asked many times in SO or in other forum...
139
votes
9answers
160769 views

How to request Administrator access inside a batch file

I am trying to write a batch file for my users to run from their Vista machines with UAC. The file is re-writing their hosts file, so it needs to be run with Administrator permissions. I need to be ...
17
votes
2answers
11557 views

Make Inno Setup installer request privileges elevation only when needed

Inno Setup installer has the PrivilegesRequired directive that can be used to control, if privileges elevation is required, when installer is starting. I want my installer to work even for non-admin u...
29
votes
7answers
32898 views

How to programmatically gain root privileges?

I am writing some software (in C++, for Linux/Mac OSX) which runs as a non-privileged user but needs root privileges at some point (to create a new virtual device). Running this program as root is no...
25
votes
6answers
14199 views

Request Windows Vista UAC elevation if path is protected?

For my C# app, I don't want to always prompt for elevation on application start, but if they choose an output path that is UAC protected then I need to request elevation. So, how do I check if a path...
9
votes
3answers
21323 views

How to set 'Run as administrator' on a file using Inno Setup

I'm creating an installer using Inno Setup. As part of the install process I'm installing Tomcat. On Windows 7 I suffer from the problem described here: http://blog.paulbouwer.com/2010/10/23/the-case...
12
votes
3answers
12620 views

Elevating privileges doesn't work with UseShellExecute=false

I want to start a child process (indeed the same, console app) with elevated privileges but with hidden window. I do next: var info = new ProcessStartInfo(Assembly.GetEntryAssembly().Location) { ...
0
votes
1answers
1525 views

Launching an administrative interactive process when a standard user is logged on

I have a system service which creates a helper interactive process as administrator so that it can access some desktop-related resources, including the BlockInput() function and NVIDIA's NVAPI functio...

Previous Next