Http://go.microsoft.com/fwlink/?linkid=570> on the "security
Descriptor Definition Language "(Security Descriptor Definition Language). (http://msdn.microsoft.com/
)
SC sdshow <ms-its:C:/WINDOWS/Help/ntcmds.chm::/sc.htm#>
Use SDDL to display the security descriptor for the service.
Grammar
*sc* [*servername*] *sdshow* *servicename*
Parameter *servername* Specifies the name of the remote server on which the service resides. The name must use the UNC format ("//MyServer"). To run on this computer
SC.exe, please ignore this parameter.
*servicename* Specifies the name of the service returned by the *getkeyname* operation. */?* displays help at the command prompt. Comments
-For more information about SDDL, see Microsoft
Website
Descriptor Definition Language "(Security Descriptor Definition Language). (http://msdn.microsoft.com/
)
Example
*SC sdshow rpcss*
**SC Start <ms-its:C:/WINDOWS/Help/ntcmds.chm::/sc.htm#>
Start the service that is running.
Grammar
*sc* [*servername*] *start* *servicename* [*servicearguments*]
Parameter *servername* Specifies the name of the remote server on which the service resides. The name must use the UNC format ("//MyServer"). To run on this computer
SC.exe, please ignore this parameter.
*servicename* Specifies the name of the service returned by the *getkeyname* operation. *servicearguments* Specifies the service parameters to be passed to the service to be started.
*/?* displays help at the command prompt. Example
The following example shows how to use the *SC start* command:
*SC Start tapisrv*
**SC Stop <ms-its:C:/WINDOWS/Help/ntcmds.chm::/sc.htm#>
Sends a STOP control request to the service.
Grammar
*sc* [*servername*] *stop* *servicename*
Parameter *servername* Specifies the name of the remote server on which the service resides. The name must use the UNC format ("//MyServer"). To run on this computer
SC.exe, please ignore this parameter.
*servicename* Specifies the name of the service returned by the *getkeyname* operation. */?* displays help at the command prompt. Warning
-Incorrectly editing the registry can severely damage your system. Before you change the registry, you should back up any valuable data on your computer.
Comments
-Not all services can be stopped.
Example
The following example shows how to use the *SC stop* command:
*SC Stop tapisrv*
Format legend Format meaning * italic * User must provide information * Bold * User must accurately type the element ellipsis (...) to be displayed on the command line parentheses in the arguments that can be repeated multiple times
([]) can be an option brace ({}), and the options are separated by a vertical bar (|). For example: {even|odd} The user must select a Courier font from the options collection
Code or program output
a simplified approach
Create a service
SC Create serverName binpath= c:/file/*.exe type= share type= Interact
start= Auto
#interact allow interaction with the desktop
#auto automatic execution, no log in user will also run
Delete Service
SC delete newserv