Thanks everyone for the help. I also wanted to be able to easily use Liberkey apps from other Liberkey apps and needed an environmental variable to point to the root of the store.
I therefore stored 2 batch files in a Liberkey\CommonFiles subdirectory and ran them via the autostart (end) settings of Liberkey. They are
1) lbk_variables_install.bat
- Code: Tout sélectionner
@echo off
REM Remove if existing
reg delete HKCU\Environment /v LBKROOT /f
reg delete HKCU\Environment /v MYAPPS /f
reg delete HKCU\Environment /v APPS /f
REM %cd:~0,-11% = current path - 11 chars from right
reg add HKCU\Environment /v LBKROOT /t REG_SZ /d %cd:~0,-11%
reg add HKCU\Environment /v MYAPPS /t REG_SZ /d %cd:~0,-11%MyApps\
reg add HKCU\Environment /v APPS /t REG_SZ /d %cd:~0,-11%Apps\
and
2)lbk_variables_remove.bat
- Code: Tout sélectionner
@echo off
reg delete HKCU\Environment /v LBKROOT /f
reg delete HKCU\Environment /v MYAPPS /f
reg delete HKCU\Environment /v APPS /f
I hope this helps anyone else who is trying to do the same