Run CMD as LOCAL SYSTEM User

Mark Berry May 22, 2009

Zenith Infotech's SAAZ platform allow you to set up jobs to run on client machine, e.g. for installing software. The jobs run as user LOCAL SYSTEM. Deploying a SAAZ job can take 15-30 minutes, which is too long to wait between test runs. So how does one open a command prompt as user LOCAL SYSTEM for testing? Adi Otlean provides the answer near the end of this post:

  1. Open a command prompt and type
    sc create CmdSvc binpath= "cmd /K start" type= own type= interact
    sc start CmdSvc
    Attempting to start the service will fail with error 1053 because CMD doesn't have any service-related code. However it will also open a new CMD window running as LOCAL SYSTEM.
  2. Do your testing in the new CMD window.
  3. When you're done, you might want to get rid of the service:
    sc delete CmdSvc

Thanks Adi

More...

About

Welcome to MCB Systems!

MCB Systems is a San Diego-based provider of software and information technology services.

Our software services include customization and programming to make software work for you.

Our proactive I.T. services help businesses control costs by providing a fixed monthly bill for routine I.T. services.

We take a consulting approach that listens first and provides solutions tailored to your business.

This Tech Blog is geared towards programmers and I.T. professionals, but end users may be interested to glimpse what goes on "behind the scenes" in developing software and keeping their computing environments stable and secure. Also visit the main Company Blog.

Mark Berry Blog author Mark Berry owns MCB Systems.

Contact MCB Systems today to discuss your technology needs!

Archive

Copyright © 2012 MCB Systems. All rights reserved.
Terms of Use - Privacy Policy
Created in WordPress using the Afterburner theme by RocketTheme.