mirror of
https://github.com/tnodir/fort
synced 2024-11-15 05:18:07 +00:00
Installer: Windows 7: Use "powershell.exe Get-AuthenticodeSignature fortfw.sys" to check installed KB4474419
This commit is contained in:
parent
1402d746e6
commit
d364bab970
@ -160,11 +160,24 @@ begin
|
|||||||
Result := (Version.Major = 6) and (Version.Minor = 1);
|
Result := (Version.Major = 6) and (Version.Minor = 1);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function IsUpdateInstalled(KB: String): Boolean;
|
function IsDriverSignatureValid(): Boolean;
|
||||||
var
|
var
|
||||||
|
DriverPath: String;
|
||||||
|
DriverName: String;
|
||||||
|
WorkingDir: String;
|
||||||
|
Command: String;
|
||||||
ResultCode: Integer;
|
ResultCode: Integer;
|
||||||
begin
|
begin
|
||||||
Exec('cmd.exe', '/c "systeminfo | findstr ' + KB + '"', '', SW_HIDE, ewWaitUntilTerminated, ResultCode)
|
DriverPath := '{app}\driver\x86';
|
||||||
|
DriverName := 'fortfw.sys';
|
||||||
|
WorkingDir := ExpandConstant('{tmp}\') + DriverPath;
|
||||||
|
|
||||||
|
ExtractTemporaryFiles(DriverPath + '\' + DriverName);
|
||||||
|
|
||||||
|
Command := '-Command "if ((Get-AuthenticodeSignature ' + DriverName
|
||||||
|
+ ').status -eq ''UnknownError'') {exit 2} else {exit 0}"';
|
||||||
|
|
||||||
|
Exec('powershell.exe', Command, WorkingDir, SW_HIDE, ewWaitUntilTerminated, ResultCode)
|
||||||
Result := ResultCode = 0;
|
Result := ResultCode = 0;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -344,7 +357,7 @@ begin
|
|||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if IsWindows7() and not IsUpdateInstalled('KB4474419') then
|
if IsWindows7() and not IsDriverSignatureValid() then
|
||||||
begin
|
begin
|
||||||
SuppressibleMsgBox(ExpandConstant('{cm:NotCompatibleWithWindows7}'), mbCriticalError, MB_OK, IDOK);
|
SuppressibleMsgBox(ExpandConstant('{cm:NotCompatibleWithWindows7}'), mbCriticalError, MB_OK, IDOK);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user