Sunday, July 1, 2012

Running a command / application as Local System

Occasionally you may need to run a command or application as Local System, say a service application that doesn’t produce enough log information and fails due to security rights.

One way to do it is by scheduling a command through Windows Task Scheduler, as explained here:
http://blogs.msdn.com/b/adioltean/archive/2004/11/27/271063.aspx?Redirected=true

But I find easier to use psexec.exe from Sysinternals’ PsTools package.
http://technet.microsoft.com/en-us/sysinternals/bb896649.aspx

Not only you can run an application locally, but you can also use it to run it on another machine remotely; run psexec without parameters to get a list of options.

psexec –s cmd.exe

psexec - local system

No comments :

Post a Comment