How can I start a process or program as the local system account?

John Savill

September 7, 2005

1 Min Read
ITPro Today logo

A. In the FAQs, "How do I schedule commands?" (http://www.windowsitpro.com/Article/ArticleID/15153/15153.html ) and " I am unable to stop a process from Task Manager even though I'm an Administrator, what can I do?" ( http://www.windowsitpro.com/Article/ArticleID/14613/14613.html ), I explain how to submit a command by using the scheduler service with the /interactive switch to start a program. Because the scheduler service runs as the local system, the program would also run with local system credentials. With Winternals' Psexec utility (which you can download at http://www.sysinternals.com/Utilities/PsExec.html), you can use the -s switch to run a program as the system account. The following example shows how to start a cmd.exe session under the system account:

whoamiSAVILLTECHjohnpsexec -s cmd.exePsExec v1.60 - Execute processes remotelyCopyright (C) 2001-2005 Mark RussinovichSysinternals - www.sysinternals.comMicrosoft Windows XP [Version 5.1.2600](C) Copyright 1985-2001 Microsoft Corp.C:WINDOWSsystem32>whoamiNT AUTHORITYSYSTEMC:WINDOWSsystem32>exitcmd.exe exited on WKSSAVD800 with error code 0.

When you use the -s switch, Psexec temporarily installs on the computer a service named "psexec running psexesvc.exe" which is removed after the application running as system is closed. Thus to run under the system context, you'll need permissions to install services.

About the Author

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like