fixed warnings when compiled with -Wwrite-strings
[reactos.git] / reactos / subsys / system / sc / usage.c
1 /*
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)
7 * REVISIONS:
8 * Ged Murphy 20/10/05 Created
9 *
10 */
11
12 #include "sc.h"
13
14 INT MainUsage(VOID)
15 {
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")
19 _T("USAGE:\n")
20 _T("\tsc <server> [command] [service name] <option1> <option2>...\n")
21
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")
48 // "\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")
54
55 return 0;
56 }
57
58
59 INT StartUsage(VOID)
60 {
61 _tprintf(_T("DESCRIPTION:\n")
62 _T(" Starts a service running.\n")
63 _T("USAGE:\n")
64 _T(" sc <server> start [service name] <arg1> <arg2> ...\n"));
65
66 return 0;
67 }
68
69
70 INT PauseUsage(VOID)
71 {
72 _tprintf(_T("DESCRIPTION:\n")
73 _T(" Sends a PAUSE control request to a service.\n")
74 _T("USAGE:\n")
75 _T(" sc <server> pause [service name]\n"));
76
77 return 0;
78 }
79
80 INT InterrogateUsage(VOID)
81 {
82 _tprintf(_T("DESCRIPTION:\n")
83 _T(" Sends an INTERROGATE control request to a service.\n")
84 _T("USAGE:\n")
85 _T(" sc <server> interrogate [service name]\n"));
86
87 return 0;
88 }
89
90
91 INT StopUsage(VOID)
92 {
93 _tprintf(_T("DESCRIPTION:\n")
94 _T(" Sends an STOP control request to a service.\n")
95 _T("USAGE:\n")
96 _T(" sc <server> stop [service name]\n"));
97
98 return 0;
99 }
100
101 INT ContinueUsage(VOID)
102 {
103 _tprintf(_T("DESCRIPTION:\n")
104 _T(" Sends an CONTINUE control request to a service.\n")
105 _T("USAGE:\n")
106 _T(" sc <server> continue [service name]\n"));
107
108 return 0;
109 }
110
111
112 INT ConfigUsage(VOID)
113 {
114 _tprintf(_T("not yet implemented\n"));
115
116 return 0;
117 }
118
119
120 INT DescriptionUsage(VOID)
121 {
122 _tprintf(_T("DESCRIPTION:\n")
123 _T(" Sets the description string for a service.\n")
124 _T("USAGE:\n")
125 _T(" sc <server> description [service name]\n"));
126
127 return 0;
128 }
129
130 INT DeleteUsage(VOID)
131 {
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")
137 _T("USAGE:\n")
138 _T(" sc <server> delete [service name]\n"));
139
140 return 0;
141 }
142
143 INT CreateUsage(VOID)
144 {
145 _tprintf(_T("Creates a service entry in the registry and Service Database.\n")
146 _T("SYNTAX:\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"));
164
165 return 0;
166 }