Command-Line Switches for Sc.exe

You can use the sc.exe command to start, stop, configure, and manage various aspects of services in the same way that you can on earlier versions of Windows. On Windows Vista, however, the sc.exe command has been enhanced with new command-line switches.

-privs Sets the required privileges for a service.

-qprivs Queries for the required privileges of a service.

-sidtype Changes a service’s SID.

-qsidtype Retrieves the setting for service’s SID.

-failureflag Changes the setting of the FailureActionsOnNonCrashFailures flag.

-qfailureflag Retrieves the setting for the FailureActionsOnNonCrashFailures flag.

-showsid Displays the service SID string corresponding to an arbitrary name.

-stop This is an old setting that has been enhanced in Windows Vista to specify the stop reason.

For more information about these new command-line switches for sc.exe, type sc /? at a command prompt.

Article by Hari Maurya

Hari Maurya is presently pursuing BE in Information Technology from Mumbai University. He also holds Diploma in Information Technology field.

Connect with him on Twitter and Facebook.

Leave a Reply