NSSM 2.0.
[nssm.git] / README.txt
1 NSSM: The Non-Sucking Service Manager\r
2 Version 2.0, 2006-09-09\r
3 \r
4 NSSM is a service helper program similar to srvany and cygrunsrv.  It can \r
5 start any application as an NT service and will restart the service if it \r
6 fails for any reason.\r
7 \r
8 NSSM also has a graphical service installer and remover.\r
9 \r
10 Since version 2.0, the GUI can be bypassed by entering all appropriate \r
11 options on the command line.\r
12 \r
13 \r
14 Usage\r
15 -----\r
16 In the usage notes below, arguments to the program may be written in angle \r
17 brackets and/or square brackets.  <string> means you must insert the \r
18 appropriate string and [<string>] means the string is optional.  See the \r
19 examples below...\r
20 \r
21 \r
22 Installation using the GUI\r
23 --------------------------\r
24 To install a service, run\r
25 \r
26     nssm install <servicename>\r
27 \r
28 You will be prompted to enter the full path to the application you wish \r
29 to run and any command line options to pass to that application.\r
30 \r
31 Use the system service manager (services.msc) to control advanced service \r
32 properties such as startup method and desktop interaction.  NSSM may \r
33 support these options at a later time...\r
34 \r
35 \r
36 Installation using the command line\r
37 -----------------------------------\r
38 To install a service, run\r
39 \r
40     nssm install <servicename> <application> [<options>]\r
41 \r
42 NSSM will then attempt to install a service which runs the named application \r
43 with the given options (if you specified any).\r
44 \r
45 Don't forget to enclose paths in "quotes" if they contain spaces!\r
46 \r
47 \r
48 Managing the service\r
49 --------------------\r
50 NSSM will launch the application listed in the registry when you send it a \r
51 start signal and will terminate it when you send a stop signal.  So far, so \r
52 much like srvany.  But NSSM is the Non-Sucking service manager and will take \r
53 action if/when the application dies.\r
54 \r
55 NSSM will try to restart itself if it notices that the application died but \r
56 you didn't send it a stop signal.  NSSM will keep trying, pausing 30 seconds \r
57 between each attempt, until the service is successfully started or you send \r
58 it a stop signal.\r
59 \r
60 \r
61 Removing services using the GUI\r
62 -------------------------------\r
63 NSSM can also remove services.  Run\r
64 \r
65     nssm remove <servicename>\r
66 \r
67 to remove a service.  You will prompted for confirmation before the service \r
68 is removed.  Try not to remove essential system services...\r
69 \r
70 \r
71 Removing service using the command line\r
72 ---------------------------------------\r
73 To remove a service without confirmation from the GUI, run\r
74 \r
75     nssm remove <servicename> confirm\r
76 \r
77 Try not to remove essential system services...\r
78 \r
79 \r
80 Example usage\r
81 -------------\r
82 To install an Unreal Tournament server:\r
83 \r
84     nssm install UT2004 c:\games\ut2004\system\ucc.exe server\r
85 \r
86 To remove the server:\r
87 \r
88     nssm remove UT2004 confirm\r
89 \r
90 \r
91 Building NSSM from source\r
92 -------------------------\r
93 NSSM is known to compile with Visual Studio 6 and Visual Studio 2005.\r
94 \r
95 \r
96 Licence\r
97 -------\r
98 NSSM is public domain.  You may unconditionally use it and/or its source code \r
99 for any purpose you wish.\r