Update Sandboxie-Plus.iss
Saves `IniPath` and restores it after upgrade. #2994
This commit is contained in:
parent
fc7a587572
commit
1a5d98356d
|
@ -108,6 +108,9 @@ Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Services\SbieSvc"; ValueName: "Pre
|
||||||
; Set language for Sbie service.
|
; Set language for Sbie service.
|
||||||
Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Services\SbieSvc"; ValueType: dword; ValueName: "Language"; ValueData: "{code:SystemLanguage}"; Check: not IsPortable
|
Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Services\SbieSvc"; ValueType: dword; ValueName: "Language"; ValueData: "{code:SystemLanguage}"; Check: not IsPortable
|
||||||
|
|
||||||
|
; Set IniPath for Sbie driver.
|
||||||
|
Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Services\SbieDrv"; ValueType: string; ValueName: "IniPath"; ValueData: "{code:GetIniPath}"; Check: IsUpgrade and IsIniPathSet
|
||||||
|
|
||||||
|
|
||||||
[Run]
|
[Run]
|
||||||
; Install the Sbie driver.
|
; Install the Sbie driver.
|
||||||
|
@ -142,7 +145,8 @@ var
|
||||||
CustomPage: TInputOptionWizardPage;
|
CustomPage: TInputOptionWizardPage;
|
||||||
IsInstalled: Boolean;
|
IsInstalled: Boolean;
|
||||||
Portable: Boolean;
|
Portable: Boolean;
|
||||||
|
IniPathExist: Boolean;
|
||||||
|
IniPath: String;
|
||||||
|
|
||||||
function IsPortable(): Boolean;
|
function IsPortable(): Boolean;
|
||||||
begin
|
begin
|
||||||
|
@ -457,9 +461,41 @@ begin
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
begin
|
||||||
|
|
||||||
|
// Return the path to use for the value of IniPath.
|
||||||
|
if RegQueryStringValue(HKLM, 'SYSTEM\CurrentControlSet\Services\SbieDrv', 'IniPath', IniPath) then
|
||||||
|
begin
|
||||||
|
if Copy(IniPath, 1, 4) = '\??\' then
|
||||||
|
begin
|
||||||
|
IniPathExist := True;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
Result := True;
|
Result := True;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function IsIniPathSet(): Boolean;
|
||||||
|
begin
|
||||||
|
|
||||||
|
// Return True or False for the value of Check.
|
||||||
|
if (IniPathExist) then
|
||||||
|
begin
|
||||||
|
Result := True;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function GetIniPath(Dummy: String): String;
|
||||||
|
begin
|
||||||
|
|
||||||
|
// Return the path to use for the value of IniPath.
|
||||||
|
if (IniPathExist) then
|
||||||
|
begin
|
||||||
|
Result := IniPath;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
//procedure CurStepChanged(CurStep: TSetupStep);
|
//procedure CurStepChanged(CurStep: TSetupStep);
|
||||||
//var
|
//var
|
||||||
// ExecRet: Integer;
|
// ExecRet: Integer;
|
||||||
|
|
Loading…
Reference in New Issue