How to start a new process without administrator privileges from a process with administrator privileges?

What you are trying to achieve cannot be done very easily and is not supported. However, it is possible using a modicum of hacking. Aaron Margosis wrote an article describing one technique. To quote the pertinent section, you will need to carry out these steps: Enable the SeIncreaseQuotaPrivilege in your current token Get an HWND …

Read more

What registry access can you get without Administrator privileges?

In general, a non-administrator user has this access to the registry: Read/Write to: HKEY_CURRENT_USER Read Only: HKEY_LOCAL_MACHINE HKEY_CLASSES_ROOT (which is just a link to HKEY_LOCAL_MACHINE\Software\Classes) It is possible to change some of these permissions on a key-by-key basis, but it’s extremely rare. You should not have to worry about that. For your purposes, your application …

Read more

Admin rights for a single method

You can add a PrincipalPermission attribute to your method to demand administrative privileges for its execution: [PrincipalPermission(SecurityAction.Demand, Role = @”BUILTIN\Administrators”)] public void MyMethod() { } This is described in more detail in the following article: Security Principles and Local Admin Rights in C# .Net If you are looking for a way to elevate an already …

Read more

Start / Stop a Windows Service from a non-Administrator user account

Below I have put together everything I learned about Starting/Stopping a Windows Service from a non-Admin user account, if anyone needs to know. Primarily, there are two ways in which to Start / Stop a Windows Service. 1. Directly accessing the service through logon Windows user account. 2. Accessing the service through IIS using Network …

Read more

How do I set a Windows scheduled task to run in the background? [closed]

As noted by Mattias Nordqvist in the comments below, you can also select the radio button option “Run whether user is logged on or not”. When saving the task, you will be prompted once for the user password. bambams noted that this wouldn’t grant System permissions to the process, and also seems to hide the …

Read more

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

You’ll want to modify the manifest that gets embedded in the program. This works on Visual Studio 2008 and higher: Project + Add New Item, select “Application Manifest File”. Change the <requestedExecutionLevel> element to: <requestedExecutionLevel level=”requireAdministrator” uiAccess=”false” /> The user gets the UAC prompt when they start the program. Use wisely; their patience can wear out quickly.