Rhyous

December 3, 2009

How to open a command prompt running as Local System on Windows 7?

Filed under: Windows 7 — J. Abram barneck @ 4:31 pm

There used to be many ways to do this, but now in Windows 7 those ways have been cut down.

Here are the two ways I know of that still work, however, only the first way I would recommend:

Method 1 – Using PsExec from Sysinternals

  1. Download psexec from here: http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx
  2. Extract it.
  3. Open a command prompt and change to the directory where you have psexec and run the following:
    psexec -i -s cmd.exe

Method 2 – Using and interactive service

  1. Open a command prompt as administrator (right click on the cmd.exe shortcut and choose Run as administrator) and run the following:

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

    WARNING: The service testsvc is configured as interactive whose support is being deprecated. The service may not function properly.

    A prompt may appear or it may only show down on the start bar and you have to click it to see it. It looks like this:

  2. Click "View Message".

    You are now at a local system command prompt.

  3. When you are done, close the command prompt and click return.

    How to verify that the command prompt is running as Local System?

    1. Run Task Manager and make sure that the cmd.exe process is running as user SYSTEM.

    2. Run SET in your command prompt and make sure the username variable equal your computer name with a $ at the end. For example if you computer is named MyPC1, the username variable would be MyPC1$.

    Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.