使用可执行文件安装驱动程序

发布于 2024-09-07 21:32:08 字数 1557 浏览 1 评论 0原文

我正在编写一个 WiX 安装程序,需要安装驱动程序作为先决条件。需要运行一个可执行文件来在 PC 上安装驱动程序。我不想在主机上安装此可执行文件。有 x64 和 x86 版本,根据平台的不同,需要安装其中之一。

当前使用命令行运行可执行文件: C:\Comp\code\install\canned\tabload\x86>tabload install "*tab1394" "C:/Comp/code/install/canned/tab1394/x86"

最后一个参数是.cat、.sys的位置和驱动程序的 .inf 文件

我当前的代码是:

<!-- Install correct device driver -->
<?if $(var.Platform) = x64?>
  <Property Id="Win64">1</Property>
<?else?>
  <Property Id="Win64">0</Property>
<?endif?>

<Binary Id="tabload64EXE" SourceFile="C:/Tableau/code/install/canned/tabload/x64/tabload.exe"  />
<Binary Id="tabload32EXE" SourceFile="C:/Tableau/code/install/canned/tabload/x86/tabload.exe" />
<CustomAction Id="LaunchFile64" 
              BinaryKey="tabload64EXE" 
              ExeCommand='tabload "*tab1394" "C:/comp/code/install/canned/tab1394/x64 "' 
              Return="asyncNoWait" />
<CustomAction Id="LaunchFile32" 
              BinaryKey="tabload32EXE" 
              ExeCommand='tabload install "*tab1394" "C:/comp/code/install/canned/tab1394/x86 "' 
              Return="asyncNoWait" />

<InstallExecuteSequence>
  <Custom Action="LaunchFile64" After="InstallFinalize">Win64</Custom>
  <Custom Action="LaunchFile32" After="InstallFinalize">NOT Win64</Custom>
</InstallExecuteSequence>

我查看了 Orca 中的表。 Win64 属性似乎设置正确。将显示自定义操作和二进制文件,并且自定义操作的目标是指示的命令行。自定义操作的类型为 196,我在网上找不到任何相关文档。当我构建并安装安装包时,程序已安装,但驱动程序组件未安装。请告知如何纠正这种情况。

谢谢!

I am working on writing a WiX installer that needs to install a driver as a prerequisite. There is an executable that needs to be run that installs the driver on the PC. I don't want to install this executable on the host machine. There is both a x64 and x86 version and, depending on the platform, one or the other needs to be installed.

The executable is currently run using the command line:
C:\Comp\code\install\canned\tabload\x86>tabload install "*tab1394" "C:/Comp/code/install/canned/tab1394/x86"

The last argument is the location of the .cat, .sys and .inf files for the driver

The current code I have is:

<!-- Install correct device driver -->
<?if $(var.Platform) = x64?>
  <Property Id="Win64">1</Property>
<?else?>
  <Property Id="Win64">0</Property>
<?endif?>

<Binary Id="tabload64EXE" SourceFile="C:/Tableau/code/install/canned/tabload/x64/tabload.exe"  />
<Binary Id="tabload32EXE" SourceFile="C:/Tableau/code/install/canned/tabload/x86/tabload.exe" />
<CustomAction Id="LaunchFile64" 
              BinaryKey="tabload64EXE" 
              ExeCommand='tabload "*tab1394" "C:/comp/code/install/canned/tab1394/x64 "' 
              Return="asyncNoWait" />
<CustomAction Id="LaunchFile32" 
              BinaryKey="tabload32EXE" 
              ExeCommand='tabload install "*tab1394" "C:/comp/code/install/canned/tab1394/x86 "' 
              Return="asyncNoWait" />

<InstallExecuteSequence>
  <Custom Action="LaunchFile64" After="InstallFinalize">Win64</Custom>
  <Custom Action="LaunchFile32" After="InstallFinalize">NOT Win64</Custom>
</InstallExecuteSequence>

I've looked at the tables in Orca. The Win64 property seems to be getting set correctly. The custom actions and binaries appear and the Target for the custom action is the indicated command line. The custom action is type 196 and I can't find any documentation for that online. When I build and install the installation package, the program is installed but the driver component is not installed. Please advise on how to remedy the situation.

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

私野 2024-09-14 21:32:08

MSI SDK CustomAction 表 包含以下链接:破译类型。我猜测根本问题是自定义操作没有延迟,因此它们不会由提升的事务执行。

The MSI SDK CustomAction table has the links to decipher the Type. I'm going to guess the root issue is that the custom actions are not deferred so they are not be executed by the elevated transaction.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文