source: installer/resources/uninstall_i2p_service_winnt.bat @ d084d18

Last change on this file since d084d18 was d084d18, checked in by kytv <kytv@…>, 9 years ago

Update of Windows service installation/removal scripts

These scripts are based on InstallApp?-NT.bat.in and UninstallApp?-NT.bat.in from
WRAPPERSRC/src/bin of version 3.5.9 of the wrapper.

Tested in XP and Win7.

  • Property mode set to 100644
File size: 2.8 KB
Line 
1@echo off
2setlocal
3
4rem Copyright (c) 1999, 2011 Tanuki Software, Ltd.
5rem http://www.tanukisoftware.com
6rem All rights reserved.
7rem
8rem This software is the proprietary information of Tanuki Software.
9rem You shall use it only in accordance with the terms of the
10rem license agreement you entered into with Tanuki Software.
11rem http://wrapper.tanukisoftware.com/doc/english/licenseOverview.html
12rem
13rem Java Service Wrapper general NT service uninstall script
14rem
15
16rem -----------------------------------------------------------------------------
17rem These settings can be modified to fit the needs of your application
18rem Optimized for use with version 3.5.9 of the Wrapper.
19
20rem The base name for the Wrapper binary.
21set _WRAPPER_BASE=i2psvc
22
23rem The name and location of the Wrapper configuration file.   This will be used
24rem  if the user does not specify a configuration file as the first argument to
25rem  this script.
26set _WRAPPER_CONF_DEFAULT=.\wrapper.config
27
28rem Note that it is only possible to pass parameters through to the JVM when
29rem  installing the service, or when running in a console.
30
31rem Do not modify anything beyond this point
32rem -----------------------------------------------------------------------------
33
34rem
35rem Resolve the real path of the wrapper.exe
36rem  For non NT systems, the _REALPATH and _WRAPPER_CONF values
37rem  can be hard-coded below and the following test removed.
38rem
39if "%OS%"=="Windows_NT" goto nt
40echo This script only works with NT-based versions of Windows.
41goto :eof
42
43:nt
44rem
45rem Find the application home.
46rem
47rem %~dp0 is location of current script under NT
48set _REALPATH=%~dp0
49
50rem
51rem Decide on the specific Wrapper binary to use (See delta-pack)
52rem
53if "%PROCESSOR_ARCHITECTURE%"=="AMD64" goto amd64
54if "%PROCESSOR_ARCHITECTURE%"=="IA64" goto ia64
55set _WRAPPER_L_EXE=%_REALPATH%%_WRAPPER_BASE%-windows-x86-32.exe
56goto search
57:amd64
58set _WRAPPER_L_EXE=%_REALPATH%%_WRAPPER_BASE%-windows-x86-64.exe
59goto search
60:ia64
61set _WRAPPER_L_EXE=%_REALPATH%%_WRAPPER_BASE%-windows-ia-64.exe
62goto search
63:search
64set _WRAPPER_EXE=%_WRAPPER_L_EXE%
65if exist "%_WRAPPER_EXE%" goto conf
66set _WRAPPER_EXE=%_REALPATH%%_WRAPPER_BASE%.exe
67if exist "%_WRAPPER_EXE%" goto conf
68echo Unable to locate a Wrapper executable using any of the following names:
69echo %_WRAPPER_L_EXE%
70echo %_WRAPPER_EXE%
71pause
72goto :eof
73
74rem
75rem Find the wrapper.conf
76rem
77:conf
78set _WRAPPER_CONF="%~f1"
79if not [%_WRAPPER_CONF%]==[""] (
80    shift
81    goto :startup
82)
83set _WRAPPER_CONF="%_WRAPPER_CONF_DEFAULT%"
84
85call "%_REALPATH%"\set_config_dir_for_nt_service.bat uninstall
86rem
87rem Uninstall the Wrapper as an NT service.
88rem
89:startup
90"%_WRAPPER_EXE%" -r %_WRAPPER_CONF%
91if not errorlevel 1 goto :eof
92if "%2"=="--nopause" goto :eof
93pause
94
95:eof
Note: See TracBrowser for help on using the repository browser.