From b92d8bb9829385e3bf90a6d15b81096c72b7fada Mon Sep 17 00:00:00 2001 From: Adam Willden Date: Wed, 14 Oct 2020 16:29:16 +0100 Subject: [PATCH] Solution: Fix PostBuild to respect %SteamPath% if already set --- utils/PostBuild.bat | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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"