Files
i2p.i2p/installer/resources/set_config_dir_for_nt_service.bat
kytv 9e6f993af5 De-fuglify the service path in Windows
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.
2011-08-31 17:11:23 +00:00

19 lines
595 B
Batchfile

@echo off
rem %~dp0 is location of current script under NT
set _REALPATH=%~dp0
set _WRAPPER_CONF="%_REALPATH%wrapper.config"
cd /d %~dp0
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