Chris Nackers

Scripting & PowerShell

NT Authority Context Command Prompt - Troubleshooting software install rights

2009-05-06

From the archive (2009). Written for the tools of the time, so some details may be out of date.

Sometimes it is useful to create a command prompt under the NT Authority/System context to test things. Most often this is a great way to test if an application can install under system context.

One way to do do this is to create a service that allows you to create a system command prompt whenever you start the service.

First you need to create the service:

sc create ntauthcmd binpath= “cmd /K start” type= own type= interact

Then you can use this command to start the service:

sc start ntauthcmd

Now, whenever you start that service, you will have a command prompt under the system context.

image