RunAs Verb (Process.Start) doesn't work from a LocalSystem .NET Service

The Process.Start method in System.Diagnostics is equivalent to CreateProcess() in Win32. If you want to  launch a process as a different user, in Win32 you either need to call CreateProcessAsUser,  CreateProcessWithLogonW or CreateProcessWithTokenW. In .NET using Process.Start, you can use the  “runas” verb to the same thing. If you have a .NET Service configured with the LocalSystem…

0

How to launch a process interactively from a Windows Service?

Launching an interactive process from a service used to be straight forward.  You could either configure your service to be interactive or you could specify “Winsta0\\Default” as the desktop (in CreateProcess API) and as long as the launched process had the appropriate permissions to the desktop, the launched process would run interactively. These techniques stopped working with…

9

How to launch a process as a Full Administrator when UAC is enabled?

With the introduction of User Access Control (UAC) with Windows VISTA, the ability to launch a process as a full administrator when UAC was enabled doesn’t automatically happen anymore.  Typically, you make the following API calls to launch a process as an Administrator (if the current user is not an administrator): You call LogonUser() where…

0

Launching an interactive process from Windows Service in Windows Vista and later

The first thing you should do about it is that, don’t do it. There are many limitations, bad implications and restrictions involved into it. In case, you are in a state that you cannot avoid launching an interactive process from Windows Service then you might want to read this article. Launching an interactive application from…