Skip to content
This repository has been archived by the owner on Mar 31, 2023. It is now read-only.

Commit

Permalink
v1.2 - Checks 32bit registry keys too
Browse files Browse the repository at this point in the history
  • Loading branch information
brysondev authored Jan 4, 2021
1 parent 48b724c commit c56ff20
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions of_install.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit c56ff20

Please sign in to comment.