diff --git a/install_driver.bat b/install_driver.bat index 95f2f51e..edae68aa 100644 --- a/install_driver.bat +++ b/install_driver.bat @@ -33,7 +33,7 @@ set VRPATH=%VRPATH:"=% set VRPATHREG_EXE=!VRPATH!\\bin\\win64\\vrpathreg.exe IF "%1"=="help" ( - ECHO Usage: install_driver.bat ^[^^] ^[^^] + ECHO Usage: install_driver.bat ^[^^] ^[^^ ^[^^] ECHO ^ defaults to "%DRIVER_PATH%" ECHO ^ defaults to "%VRPATHREG_EXE%" GOTO end @@ -54,12 +54,15 @@ IF NOT EXIST "%DRIVER_PATH%" ( echo( GOTO end ) + IF NOT EXIST "%VRPATHREG_EXE%" ( ECHO vrpathreg.exe not found: "%VRPATHREG_EXE%" echo( - echo This usualy means an error with your SteamVR installation. + echo This usualy means an error with your SteamVR installation, or if you have multiple installations of SteamVR. + echo You can also try to locate the vrpathreg.exe file yourself and input it below. The file is inside SteamVR\bin\win64. echo( - GOTO end + + set /p "VRPATHREG_EXE=Enter full path to vrpathreg.exe: " ) REM remove driver from older versions @@ -117,6 +120,22 @@ set VRCONFIG=%VRCONFIG:"=% set VRSETTINGS=!VRCONFIG!\\steamvr.vrsettings +IF NOT "%3"=="" ( + SET "VRSETTINGS=%3" +) + +IF NOT EXIST "%VRSETTINGS%" ( + ECHO steamvr.vrsettings not found: "%VRSETTINGS%" + echo( + echo This usualy means an error with your SteamVR installation, or if you have multiple installations of SteamVR. + echo You can also try to locate the steamvr.vrsettings file yourself and input it below. The file is inside Steam/config. + echo( + + set /p "VRSETTINGS=Enter full path to steamvr.vrsettings:" +) + +REM we search for the steamvr section, and add the line to it + set search="steamvr" : { set replace="steamvr" : { "activateMultipleDrivers" : true, @@ -129,6 +148,8 @@ set VRSETTINGS=!VRCONFIG!\\steamvr.vrsettings endlocal ) +REM if activateMultipleDrivers is already set to false, set it to true. SteamVR will fix up the config and remove duplicates + set search="activateMultipleDrivers" : false, set replace="activateMultipleDrivers" : true, diff --git a/uninstall_driver.bat b/uninstall_driver.bat index 07c06ceb..91efc988 100644 --- a/uninstall_driver.bat +++ b/uninstall_driver.bat @@ -46,7 +46,12 @@ REM remove driver from older versions IF NOT EXIST "%VRPATHREG_EXE%" ( ECHO vrpathreg.exe not found: "%VRPATHREG_EXE%" - GOTO end + echo( + echo This usualy means an error with your SteamVR installation, or if you have multiple installations of SteamVR. + echo You can also try to locate the vrpathreg.exe file yourself and input it below. The file is inside SteamVR\bin\win64. + echo( + + set /p "VRPATHREG_EXE=Enter full path to vrpathreg.exe: " ) IF EXIST "!VRPATH!\\drivers\\apriltagtrackers" (