Force a non-x86 ProgramFiles path

This commit is contained in:
idk
2021-08-02 17:51:47 -04:00
parent 59ca9d1d7f
commit cd15ee07c1
2 changed files with 7 additions and 2 deletions

View File

@ -86,7 +86,6 @@ public class WinLauncher {
}
}
private static File selectHome() { //throws Exception {
if (SystemVersion.isWindows()) {
File home = new File(System.getProperty("user.home"));

View File

@ -416,5 +416,11 @@ SectionEnd
Function LaunchLink
#ExecShell "" "$SMPROGRAMS\${APPNAME}\${APPNAME}.lnk"
Exec "$INSTDIR\i2pbrowser.bat"
System::Call 'Kernel32::SetEnvironmentVariable(t, t)i ("ProgramFiles", "$PROGRAMFILES64").r0'
StrCmp $0 0 error
Exec "$INSTDIR\i2pbrowser.bat"
Goto done
error:
MessageBox MB_OK "Can't set environment variable"
done:
FunctionEnd