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