From 17b7b093339761a8055c8a7ee8b5ac4c96534a02 Mon Sep 17 00:00:00 2001 From: "Scott E. Graves" Date: Wed, 30 Jul 2025 07:49:34 -0500 Subject: [PATCH] Create Windows installer #53 --- repertory.iss.in | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/repertory.iss.in b/repertory.iss.in index b6175feb..bf2ddb61 100644 --- a/repertory.iss.in +++ b/repertory.iss.in @@ -32,16 +32,19 @@ WizardStyle=modern function CheckAddPath(Param: string): boolean; var CurPath: string; + PathPos: Integer; begin - if not RegQueryStringValue(HKEY_LOCAL_MACHINE, + if RegQueryStringValue(HKEY_LOCAL_MACHINE, 'SYSTEM\CurrentControlSet\Control\Session Manager\Environment', - 'Path', CurPath) + 'PATH', CurPath) then begin - Result := True; + PathPos := Pos(';' + Param + ';', ';' + CurPath + ';'); + Result := PathPos = 0; + MsgBox('Path|' + CurPath + '|Param|' + Param + '|Pos|' + IntToStr(PathPos), mbInformation, MB_OK); exit; end; - Result := Pos(';' + Param + ';', ';' + CurPath + ';') = 0; + Result := True; end; [Languages] @@ -66,4 +69,4 @@ Filename: "msiexec.exe"; WorkingDir: "{app}"; Parameters: "/a winfsp-@WINFSP_VER [Registry] Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; \ ValueType: expandsz; ValueName: "Path"; ValueData: "{olddata};{app};"; \ - Check: CheckAddPath('{app}') + Check: CheckAddPath("{app}")