Share via


Launching a CMD window as Local System

What is your favorite method of launching CMD.EXE as Local System? I found the following method after a little experimentation. Just run the command below to create a generic service called TESTSVC.

C:\>sc create testsvc binpath= "cmd /K start" type= own type= interact

[SC] CreateService SUCCESS

 

Then, whenever you need a new CMD running as Local System, just start the service, and a new CMD window will appear on the console desktop. You can ignore the error 1053, which is "by design" :-)

 

C:\>sc start testsvc

[SC] StartService FAILED 1053:

 

The service did not respond to the start or control request in a timely fashion.

 

 

P.S. If you are interested in technical details, I added a detailed discussion in this article...

Comments

  • Anonymous
    November 29, 2004
    The comment has been removed
  • Anonymous
    November 30, 2004
    This won't work for the Local SYSTEM account. Note that this is a special account that you cannot log into. The only way to create a process running under this account is to "convince" another process also running under the Local System account to start it.
  • Anonymous
    November 30, 2004
    My favorite is

    c:at <time> cmd.exe /interactive
  • Anonymous
    December 01, 2004
    Amit,

    Check "soon" vs. "at"
  • Anonymous
    October 08, 2008
    PingBack from http://gogochicken.wordpress.com/2008/10/09/running-cmdexe-as-local-system/