Create Windows installer #53

This commit is contained in:
2025-07-30 07:49:34 -05:00
parent 5f4b853764
commit 17b7b09333

View File

@@ -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}")