diff --git a/installer/install.xml b/installer/install.xml index c0ae82c38..e191c8eb7 100644 --- a/installer/install.xml +++ b/installer/install.xml @@ -141,7 +141,7 @@ SYSTEM_sun_arch_data_model 64 - + @@ -237,7 +237,7 @@ Automatically start I2P in the background - + diff --git a/installer/resources/install_i2p_service_winnt.bat b/installer/resources/install_i2p_service_winnt.bat index 5fe310680..46804a55f 100644 --- a/installer/resources/install_i2p_service_winnt.bat +++ b/installer/resources/install_i2p_service_winnt.bat @@ -25,6 +25,8 @@ set _WRAPPER_CONF="%~f1" if not %_WRAPPER_CONF%=="" goto startup set _WRAPPER_CONF="%_REALPATH%wrapper.config" +call "%_REALPATH%"\set_config_dir_for_nt_service.bat install + rem rem Install the Wrapper as an NT service. rem @@ -32,7 +34,7 @@ rem :: We remove the existing service to :: 1) force the service to stop :: 2) update service configuration in case wrapper.config was edited -:: 3) prevent hanging the installer if 'install as service' is selected +:: 3) prevent hanging the installer if 'install as service' is selected :: and it's already enabled as a service. "%_WRAPPER_EXE%" -r %_WRAPPER_CONF% "%_WRAPPER_EXE%" -i %_WRAPPER_CONF% diff --git a/installer/resources/set_config_dir_for_nt_service.bat b/installer/resources/set_config_dir_for_nt_service.bat index adbabdad7..1c4e5b337 100644 --- a/installer/resources/set_config_dir_for_nt_service.bat +++ b/installer/resources/set_config_dir_for_nt_service.bat @@ -1,4 +1,18 @@ @echo off +rem %~dp0 is location of current script under NT +set _REALPATH=%~dp0 +set _WRAPPER_CONF="%_REALPATH%wrapper.config" + cd /d %~dp0 -echo. -echo wrapper.java.additional.5=-Di2p.dir.config="%APPDATA%\i2p">>wrapper.config +if "%1"=="uninstall" ( + FINDSTR /I /v "^wrapper.java.additional.5=-Di2p.dir.config=" %_WRAPPER_CONF% >> %_WRAPPER_CONF%.new + move %_WRAPPER_CONF%.new %_WRAPPER_CONF% + goto end +) else ( + FINDSTR /I "^wrapper.java.additional.5=-Di2p.dir.config=" %_WRAPPER_CONF% + if not errorlevel 1 goto end + echo wrapper.java.additional.5=-Di2p.dir.config="%ALLUSERSPROFILE%\Application Data\i2p" >> %_WRAPPER_CONF% + goto end +) + +:end diff --git a/installer/resources/shortcutSpec.xml b/installer/resources/shortcutSpec.xml index d95fc5b70..fac66f88d 100644 --- a/installer/resources/shortcutSpec.xml +++ b/installer/resources/shortcutSpec.xml @@ -1,6 +1,16 @@ +