diff --git a/utils/PostBuild.bat b/utils/PostBuild.bat index eda8dc2a2..31d396f00 100644 --- a/utils/PostBuild.bat +++ b/utils/PostBuild.bat @@ -1,8 +1,10 @@ @echo off -FOR /f "tokens=1,2*" %%E in ('reg query "HKEY_CURRENT_USER\Software\Valve\Steam"') DO ( - IF "%%E"=="SteamPath" ( - set SteamPath=%%G - ) +IF "%SteamPath%" EQU "" ( + FOR /f "tokens=1,2*" %%E in ('reg query "HKEY_CURRENT_USER\Software\Valve\Steam"') DO ( + IF "%%E"=="SteamPath" ( + set SteamPath=%%G + ) + ) ) IF "%SteamPath%" NEQ "" ( XCOPY /R /Y /V %1 "%SteamPath%\SteamApps\common\Fortress Forever\FortressForever\bin"