Automatically try both 32 and 64-bit paths for Tools

This commit is contained in:
Michael Fabian 'Xaymar' Dirks
2017-11-19 20:32:08 +01:00
parent f610d01f96
commit 282998baeb
4 changed files with 15 additions and 15 deletions
+11
View File
@@ -0,0 +1,11 @@
@ECHO OFF
:: Garry's Mod
SET "GARRYSMODPATH=C:\Program Files (x86)\Steam\steamapps\common\GarrysMod"
FOR /F "tokens=2* delims= " %%A IN ('REG QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Steam App 4000" /v InstallLocation') DO SET "GARRYSMODPATH=%%B"
IF "%GARRYSMODPATH%" == "" (
FOR /F "tokens=2* delims= " %%A IN ('REG QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Steam App 4000" /v InstallLocation') DO SET "GARRYSMODPATH=%%B"
)
IF "%GARRYSMODPATH%" == "" (
ECHO Failed to figure out where Garry's Mod is installed.
)