This article is a mirror article of machine translation, please click here to jump to the original article.

View: 10281|Reply: 2

SC Create creates a Windows system service

[Copy link]
Posted on 12/14/2015 10:04:31 AM | | |

C:\Users\sophiaX>sc
Description:
        SC is a command-line program used to communicate with the Service Control Manager and services.
Usage:
        sc <server> [command] [service name] <option1> <option2>...


        option <server> in the format "\\ServerName"
        Type "sc [command]" to get further help with the command
        Command:
          query----------- query the status of the service,
                          or enumerate the status of the service type.
          queryex--------- the extended state of the query service,
                          or enumerate the status of the service type.
          start----------- Start the service.
          PAUSE ----------- sends a PAUSE control request to the service.
          Interrogate ----- sends an INTERROGATE control request to the service.
          continue-------- Send a CONTINUE control request to the service.
          stop------------ sends a STOP request to the service.
          config---------- change the configuration of the service (permanently).
          descrip{filter}tion----- change the description of the service.
          failure--------- action taken when a change service fails.
          failureflag----- Change the failure action flag of a service.
          sidtype--------- Change the service SID type of the service.
          privs----------- change the required permissions for the service.
          QC -------------- query the configuration information of the service.
          qdescrip{filter}tion---- description of the query service.
          qfailure-------- the action performed by the service when the query fails.
          qfailureflag---- is a failed action flag for the query service.
          qsidtype-------- the service SID type of the query service.
          qprivs ---------- query the required permissions for the service.
          qtriggerinfo---- the trigger parameter of the query service.
          qpreferrednode - Query the preferred service NUMA node.
          delete---------- (from the registry) to delete the service.
          create---------- create a service (add it to the registry).
          control--------- sends controls to the service.
          SDSow ---------- display the security descriptor of the service.
          sdset----------- sets the security descriptor of the service.
          showsid--------- displays the SID string corresponding to the supposed name.
          triggerinfo----- Configure the trigger parameters of the service.
          preferrednode--- set the preferred service NUMA node.
          GetDisplayName - Get the DisplayName of the service
          GetKeyName------ Get the ServiceKeyName of the service.
          EnumDepend------ enumerate the dependencies of a service.

C:\Users\sophiaX>sc create qqian binPath= "C:\Program Files\TTPlayer\TTPlayer.exe" start= auto
[SC] CreateService succeeds
C:\Users\sophiaX>net start qqian



Check out new and innovative services at services.msc.

C:\Users\sophiaX>sc delete
Description:
        Delete a service item from the registry.
        If the service is running, or if another process is already open
        To the handle of this service, the service will simply be marked as
        Delete.
Usage:
        sc <server> delete [service name]
C:\Users\sophiaX>sc delete qqian
[SC] DeleteService succeeds
C:\Users\sophiaX>

C:\Users\sophiaX>sc create
Description:
        Create service items in the registry and service database.
Usage:
        sc <server> create [service name] [binPath= ] <option1> <option2>...

Options:
Note: Option names include equal signs.
      A space is required between the equal sign and the value.
type= <own|share|interact|kernel|filesys|rec>
       (default = own)
start= <boot|system|auto|demand|disabled|delayed-auto>
       (default = demand)
error= <normal|severe|critical|ignore>
       (default = normal)
binPath= <BinaryPathName>
group= <LoadOrderGroup>
tag= <yes|no>
depend= < dependencies (separated by / (slash)) >
obj= <AccountName|ObjectName>
       (Default = LocalSystem)
DisplayName<显示名称>=
password<密码>=




Previous:See how my linux protects against SYN attacks
Next:.net list and array
Posted on 12/14/2015 3:55:24 PM |
Posted on 12/17/2015 1:56:30 AM |
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com