C:\MyApp\bin>UninstallMyApp-NT.bat
wrapper | Service is running. Stopping it...
wrapper | Waiting to stop...
wrapper | My Application stopped.
wrapper | My Application removed.
直接「wrapper.exe」ファイルを使う
Java Service Wrapperから提供されているスクリプトを使う代わりに、
直接、Wrapperを起動することを選ぶこともできます。
もし、何もパラメーターがない状態で
「wrapper.exe」ファイルを実行すると、
以下のように、使い方の出力が表示されます。
C:\MyApp\bin>wrapper.exe
Wrapper (Version 3.n.n) http://wrapper.tanukisoftware.org
Usage:
wrapper.exe <command> <configuration file> [configuration properties] [...]
wrapper.exe <configuration file> [configuration properties] [...]
(<command> implicitly '-c')
wrapper.exe <command>
(<configuration file> implicitly 'wrapper.conf')
wrapper.exe
(<command> implicitly '-c' and <configuration file> 'wrapper.conf')
where <command> can be one of:
-c --console run as a Console application
-t --start starT an NT service
-p --stop stoP a running NT service
-i --install Install as an NT service
-r --remove Remove as an NT service
-q --query Query the current status of the service
-qs --querysilent Silently Query the current status of the service
-? --help print this help message
<configuration file> is the wrapper.conf to use. Name must be absolute or relative
to the location of wrapper.exe
[configuration properties] are configuration name-value pairs which override values
in wrapper.conf. For example:
wrapper.debug=TRUE
C:\MyApp\bin>wrapper.exe -q ..\conf\wrapper.conf
wrapper | The My Application Service is installed.
wrapper | Start Type: Automatic
wrapper | Interactive: Yes
wrapper | Running: No
1 : Service is installed
2 : Service is running
4 : Service is interactive
8 : Start type is automatic
16 : Start type is manual
32 : Start type is disabled