Create Windows installer #53
This commit is contained in:
@@ -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}")
|
||||||
|
Reference in New Issue
Block a user