From c56ff2091801916fba04c458a0f8aa82e44d07eb Mon Sep 17 00:00:00 2001 From: Bryson <13501615+brysondev@users.noreply.github.com> Date: Mon, 4 Jan 2021 11:00:16 -0500 Subject: [PATCH] v1.2 - Checks 32bit registry keys too --- of_install.bat | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/of_install.bat b/of_install.bat index ca72b2c..73b7d37 100644 --- a/of_install.bat +++ b/of_install.bat @@ -48,11 +48,23 @@ set PATH_STEAM=HKEY_CURRENT_USER\SOFTWARE\Valve\Steam set VALUE_STEAM=SourceModInstallPath FOR /F "usebackq skip=2 tokens=1,2*" %%A IN (`REG QUERY %PATH_STEAM% /v %VALUE_STEAM% 2^>nul`) DO ( - set ValueName2=%%A - set ValueType2=%%B set STEAM_REG_PATH=%%C ) +if not exist %STEAM_REG_PATH%\NUL ( + goto 32bitSteam +) + +:32bitSteam +set PATH_STEAM=HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Valve\Steam +set VALUE_STEAM=InstallPath + +FOR /F "usebackq skip=2 tokens=1,2*" %%A IN (`REG QUERY %PATH_STEAM% /v %VALUE_STEAM% 2^>nul`) DO ( + set STEAM_REG_PATH=%%C +) + +set "STEAM_REG_PATH=%STEAM_REG_PATH%\steamapps\sourcemods" + if not exist %STEAM_REG_PATH%\NUL ( echo Steam not installed! ^(Or you've messed with your registry...^) goto exitmain @@ -81,7 +93,7 @@ goto finishMain ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :finishMain echo ====================================== -echo Succussfully installed Open Fortress! +echo Successfully installed Open Fortress! echo ====================================== echo Please restart Steam (If you aren't updating) by clicking STEAM ^> ^EXIT at the top of the steam client, then restart! echo.