Skip to content

Commit f70d9bf

Browse files
committed
Correctly obtain the installed game path
1 parent cede79c commit f70d9bf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tools/build-installer/inno/installer.twig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,11 +199,11 @@ function DefaultDir(Param: String): String;
199199
var
200200
gamepath: String;
201201
begin
202-
gamepath:=ExtractFilePath(ExpandConstant('{reg:HKLM\{cm:GameRegEng},InstallPath|{cm:DefaultGamePathEng}}'));
202+
gamepath:=ExtractFilePath(ExpandConstant('{reg:HKLM32\{cm:GameRegEng},InstallPath|{cm:DefaultGamePathEng}}'));
203203
if (not FileExists(gamepath+ExpandConstant('\{cm:CheckFile}'))) then
204-
gamepath:=ExpandConstant('{reg:HKLM\{cm:TFDReg},r2_folder|{pf}\{cm:TFDDirEnglish}}');
204+
gamepath:=ExpandConstant('{reg:HKLM32\{cm:TFDReg},r2_folder|{pf}\{cm:TFDDirEnglish}}');
205205
if (not FileExists(gamepath+ExpandConstant('\{cm:CheckFile}'))) then
206-
gamepath:=ExpandConstant('{reg:HKLM\{cm:OriginReg},Install Dir|{pf}\{cm:OriginDir}}');
206+
gamepath:=ExpandConstant('{reg:HKLM32\{cm:OriginReg},Install Dir|{pf}\{cm:OriginDir}}');
207207
if (not FileExists(gamepath+ExpandConstant('\{cm:CheckFile}'))) then
208208
gamepath:=ExpandConstant('{pf}\{cm:TFDDirEnglish}');
209209
if (not FileExists(gamepath+ExpandConstant('\{cm:CheckFile}'))) then

0 commit comments

Comments
 (0)