Saturday, 25 October 2014

How to: Run Program as Local System Account

   Running a Program or Batch file under different user account is one of the easiest way to impersonate a Program/Application with some other user's privilege. For every administrators, this would be the common need either for testing or to impersonate different user privilege. In this article, I am going to write and explain about how to run a program or batch script under Local System account context.

You can execute or run a program under local system account by using sysinternals's Psexec utility. you can download at 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:
C:\PSTools> PsExec -s cmd.exe

PsExec v2.1 - Execute processes remotely
Copyright (C) 2001-2013 Mark Russinovich
Sysinternals -

Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

nt authority\system

cmd.exe exited on HP-PC with error code 0.
How to Run Program or Batch file under Local System Account

Once you have completed the work you can revert to current user by executing exit command.

Software Developer


No comments:

Post a Comment