Tuesday, April 6, 2010

Run command prompt from system account

Normally process run with account which is currenlty logged in and Services run in System account.

so the idea is to create a service which will launch "Command prompt". This idea is valid to launch any application in System account.

This is the command to create such a servcie: (type this on command prompt)

sc create testservice binpath= "cmd /k start" type= own type= interact

please remember that there is no space before '=' and one space after '='. I dont know why but it is required.

This command will install the service, now go to services.msc and start this new service. one error will come but still you will be able to see a cmd.exe running in system account  :)