b92cd069119fd032b519dcfcfcc9b67919f033f7
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS SC utility
4 * FILE: subsys/system/sc/usage.c
5 * PURPOSE: control ReactOS services
6 * PROGRAMMERS: Ged Murphy (gedmurphy@gmail.com)
8 * Ged Murphy 20/10/05 Created
16 _tprintf(_T("DESCRIPTION:\n")
17 _T("\tSC is a command line program used for communicating with\n")
18 _T("\tthe Service Control Manager and its services.\n")
20 _T("\tsc <server> [command] [service name] <option1> <option2>...\n")
22 _T("\tThe optional parameter <server> has the form \"\\ServerName\"\n")
23 _T("\tFurther help on commands can be obtained by typing: \"sc [command]\"\n")
24 _T("\tService Commands:\n")
25 _T("\t query : Queries the status for a service, or\n")
26 _T("\t enumerates the status for types of services.\n")
27 _T("\t queryex : Queries the extended status for a service, or\n")
28 // _T("\t enumerates the status for types of services.\n"
29 _T("\t start : Starts a service.\n")
30 _T("\t pause : Sends a PAUSE control request to a service.\n")
31 _T("\t interrogate : Sends a INTERROGATE control request to a service.\n")
32 _T("\t continue : Sends a CONTINUE control request to a service.\n")
33 _T("\t stop : Sends a STOP request to a service.\n")
34 // "\t config : Changes the configuration of a service (persistant).\n"
35 // "\t description : Changes the description of a service.\n"
36 // "\t failure : Changes the actions taken by a service upon failure.\n"
37 // "\t qc : Queries the configuration information for a service.\n"
38 // "\t qdescription : Queries the description for a service.\n"
39 // "\t qfailure : Queries the actions taken by a service upon failure.\n"
40 _T("\t delete : Deletes a service (from the registry).\n")
41 _T("\t create : Creates a service. (adds it to the registry).\n")
42 _T("\t control : Sends a control to a service.\n"));
43 // "\t sdshow : Displays a service's security descriptor.\n")
44 // "\t sdset : Sets a service's security descriptor.\n")
45 // "\t GetDisplayName : Gets the DisplayName for a service.\n")
46 // "\t GetKeyName : Gets the ServiceKeyName for a service.\n")
47 // "\t EnumDepend : Enumerates Service Dependencies.\n")
49 // "\tService Name Independant Commands:\n")
50 // "\t boot : (ok | bad) Indicates whether the last boot should\n")
51 // "\t be saved as the last-known-good boot configuration\n")
52 // "\t Lock : Locks the SCM Database\n")
53 // "\t QueryLock : Queries the LockStatus for the SCM Database\n")
61 _tprintf(_T("DESCRIPTION:\n")
62 _T(" Starts a service running.\n")
64 _T(" sc <server> start [service name] <arg1> <arg2> ...\n"));
72 _tprintf(_T("DESCRIPTION:\n")
73 _T(" Sends a PAUSE control request to a service.\n")
75 _T(" sc <server> pause [service name]\n"));
80 INT
InterrogateUsage(VOID
)
82 _tprintf(_T("DESCRIPTION:\n")
83 _T(" Sends an INTERROGATE control request to a service.\n")
85 _T(" sc <server> interrogate [service name]\n"));
93 _tprintf(_T("DESCRIPTION:\n")
94 _T(" Sends an STOP control request to a service.\n")
96 _T(" sc <server> stop [service name]\n"));
101 INT
ContinueUsage(VOID
)
103 _tprintf(_T("DESCRIPTION:\n")
104 _T(" Sends an CONTINUE control request to a service.\n")
106 _T(" sc <server> continue [service name]\n"));
112 INT
ConfigUsage(VOID
)
114 _tprintf(_T("not yet implemented\n"));
120 INT
DescriptionUsage(VOID
)
122 _tprintf(_T("DESCRIPTION:\n")
123 _T(" Sets the description string for a service.\n")
125 _T(" sc <server> description [service name]\n"));
130 INT
DeleteUsage(VOID
)
132 _tprintf(_T("DESCRIPTION:\n")
133 _T(" Deletes a service entry from the registry.\n")
134 _T(" If the service is running, or another process has an\n")
135 _T(" open handle to the service, the service is simply marked\n")
136 _T(" for deletion.\n")
138 _T(" sc <server> delete [service name]\n"));
143 INT
CreateUsage(VOID
)
145 _tprintf(_T("Creates a service entry in the registry and Service Database.\n")
147 _T("sc create [service name] [binPath= ] <option1> <option2>...\n")
148 _T("CREATE OPTIONS:\n")
149 _T("NOTE: The option name includes the equal sign.\n")
150 _T(" type= <own|share|interact|kernel|filesys|rec>\n")
151 _T(" (default = own)\n")
152 _T(" start= <boot|system|auto|demand|disabled>\n")
153 _T(" (default = demand)\n")
154 _T(" error= <normal|severe|critical|ignore>\n")
155 _T(" (default = normal)\n")
156 _T(" binPath= <BinaryPathName>\n")
157 _T(" group= <LoadOrderGroup>\n")
158 _T(" tag= <yes|no>\n")
159 _T(" depend= <Dependencies(separated by / (forward slash))>\n")
160 _T(" obj= <AccountName|ObjectName>\n")
161 _T(" (default = LocalSystem)\n")
162 _T(" DisplayName= <display name>\n")
163 _T(" password= <password>\n"));