基于Inno Setup的安装程序挂起安装未签名的驱动程序

时间:2016-09-15 13:59:16

标签: windows windows-7 installer driver inno-setup

我正在开发一个安装程序,用于部署一个软件及其各种依赖项。其中一个依赖项是未签名的驱动程序。这个驱动程序已经有自己的安装程序,所以如果当前没有安装驱动程序,我的Inno安装脚本只调用此.exe。

然后,在Windows unsigned驱动程序提示符显示之前,此驱动程序的安装将挂起。值得注意的是,提示将最终显示,但每次至少需要10分钟,这是不可接受的。

我尝试使用和不使用提升权限运行。单独运行驱动程序安装可执行文件时不会遇到此问题。

我在以下操作系统上遇到此问题:

  • Windows 7 Professional SP1 - 使用KB3033929安全更新。
  • Windows 8.1 Professional

编辑以包含代码*

[Files]
Source: src\ff\driverexecutable.exe; DestDir: {tmp}\ff; Check: ffDriverVerCheck();

[Run]
Filename: {tmp}\ff\driverexecutable.exe; Check: ffDriverVerCheck();

[Code]
  function ffDriverVerCheck(): boolean;
  var
    CVersionMS, CVersionLS, IVersionMS, IVersionLS: cardinal;
  begin 
    if FileExists(ExpandConstant('{sys}\DRIVERS\xxx.sys')) and FileExists(ExpandConstant('{sys}\WdfCoInstaller01011.dll')) then begin
      if GetVersionNumbers(ExpandConstant('{sys}\DRIVERS\xxx.sys'), CVersionMS, CVersionLS) and GetVersionNumbers(ExpandConstant('{src}\src\ff\driverexecutable.exe'), IVersionMS, IVersionLS)then begin
        if CVersionMS < IVersionMS then begin
          Result := True;  
        end else begin
          Result := False;
        end;
      end;
    end else begin
      Result := True;
    end;
  end;

如果系统上当前存在驱动程序的旧版本或没有版本,则上面的代码只会将driverexecutable.exe解压缩为temp。

0 个答案:

没有答案
相关问题