forked from I2P_Developers/i2p.i2p

The default service path in Windows is fugly and not very convenient. I2P uses the correct path, but if you want to access snark or eepsite data, one must go to %SYSTEMROOT%\config\systemprofile\AppData\Roaming\I2P\ (Vista/7) or %SYSTEMROOT%\system32\config\systemprofile\Application Data\I2P (XP/2003). If this wasn't bad enough, in some cases one must take ownership of this path and grant permission to him- or herself to access the folder. With this changeset, I'm setting the path to %ALLUSERSPROFILE%\Application Data\I2P as well as adding a shortcut to the I2P folder in the Start menu.
39 lines
771 B
Batchfile
39 lines
771 B
Batchfile
@echo off
|
|
setlocal
|
|
|
|
rem
|
|
rem Java Service Wrapper general NT service uninstall script
|
|
rem
|
|
|
|
if "%OS%"=="Windows_NT" goto nt
|
|
echo This script only works with NT-based versions of Windows.
|
|
goto :eof
|
|
|
|
:nt
|
|
rem
|
|
rem Find the application home.
|
|
rem
|
|
rem %~dp0 is location of current script under NT
|
|
set _REALPATH=%~dp0
|
|
set _WRAPPER_EXE=%_REALPATH%I2Psvc.exe
|
|
call "%_REALPATH%"\set_config_dir_for_nt_service.bat uninstall
|
|
|
|
rem
|
|
rem Find the wrapper.conf
|
|
rem
|
|
:conf
|
|
set _WRAPPER_CONF="%~f1"
|
|
if not %_WRAPPER_CONF%=="" goto startup
|
|
set _WRAPPER_CONF="%_REALPATH%wrapper.config"
|
|
|
|
rem
|
|
rem Uninstall the Wrapper as an NT service.
|
|
rem
|
|
:startup
|
|
"%_WRAPPER_EXE%" -r %_WRAPPER_CONF%
|
|
if not errorlevel 1 goto :eof
|
|
if "%2"=="--nopause" goto :eof
|
|
pause
|
|
|
|
:eof
|