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; function CheckAddPath(Param: string): boolean;
var var
CurPath: string; CurPath: string;
PathPos: Integer;
begin begin
if not RegQueryStringValue(HKEY_LOCAL_MACHINE, if RegQueryStringValue(HKEY_LOCAL_MACHINE,
'SYSTEM\CurrentControlSet\Control\Session Manager\Environment', 'SYSTEM\CurrentControlSet\Control\Session Manager\Environment',
'Path', CurPath) 'PATH', CurPath)
then begin then begin
Result := True; PathPos := Pos(';' + Param + ';', ';' + CurPath + ';');
Result := PathPos = 0;
MsgBox('Path|' + CurPath + '|Param|' + Param + '|Pos|' + IntToStr(PathPos), mbInformation, MB_OK);
exit; exit;
end; end;
Result := Pos(';' + Param + ';', ';' + CurPath + ';') = 0; Result := True;
end; end;
[Languages] [Languages]
@@ -66,4 +69,4 @@ Filename: "msiexec.exe"; WorkingDir: "{app}"; Parameters: "/a winfsp-@WINFSP_VER
[Registry] [Registry]
Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; \ Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; \
ValueType: expandsz; ValueName: "Path"; ValueData: "{olddata};{app};"; \ ValueType: expandsz; ValueName: "Path"; ValueData: "{olddata};{app};"; \
Check: CheckAddPath('{app}') Check: CheckAddPath("{app}")