使用 Microsoft WIX 安装命名空间扩展

发布于 2024-08-21 04:32:43 字数 67 浏览 7 评论 0原文

使用 wix 安装命名空间扩展的最佳/最简单方法是什么? 特别是如何在启用了 UAC 的 Windows 7 上安装它。

What is the best/easiest way to install a namespace extension using wix?
Especially how do I install it on Windows 7 with enabled UAC.

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

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

发布评论

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

评论(2

彼岸花ソ最美的依靠 2024-08-28 04:32:43

我通过使用 WiX 的内置自定义操作解决了这个问题,您只需在运行自定义操作之前设置命令行选项即可。下面是我们如何做到这一点的示例:

<CustomAction Id='RegisterExtensions.SetProperty' Property='QtExecCmdLine' 
    Value='"[INSTALLDIR]RegisterExtensionDotNet20_x86.exe" -i "[INSTALLDIR]LogicNP.EZShellExtensions.dll" "[INSTALLDIR]LogicNP.EZNamespaceExtensions.dll" "[INSTALLDIR]MyNse.dll"'/>

<CustomAction Id='RegisterExtensions' BinaryKey="WixCA" DllEntry="CAQuietExec" Execute="immediate" Return="check"/>

对于 64 位也必须这样做。我还有单独的 64 位版本的自定义操作:

<CustomAction Id='RegisterExtensions64.SetProperty' Property='QtExecCmdLine'
      Value='"[INSTALLDIR]RegisterExtensionDotNet20_x64.exe" -i "[INSTALLDIR]LogicNP.EZShellExtensions.dll" "[INSTALLDIR]LogicNP.EZNamespaceExtensions.dll" "[INSTALLDIR]MyNse.dll"'/>

<CustomAction Id='RegisterExtensions64' BinaryKey="WixCA" DllEntry="CAQuietExec" Execute="immediate" Return="check"/>

您还必须将注册过程安排到 WiX 构建文件中:

<Custom Action="RegisterExtensions.SetProperty" Before="RegisterExtensions">(NOT Installed)</Custom>
<Custom Action='RegisterExtensions' After="InstallFinalize">(NOT Installed)</Custom>
<Custom Action='RegisterExtensions64.SetProperty' Before='RegisterExtensions64'>(NOT Installed) AND (VersionNT64)</Custom>
  <Custom Action='RegisterExtensions64' After='RegisterExtensions'>(NOT Installed) AND (VersionNT64)</Custom>

结果是您需要在安装程序中包含 EZNamespaceExtension 可执行文件。

I've solved this with by using a built in custom action from WiX where you just set the command line option before running the custom action. Here's an example how we do it:

<CustomAction Id='RegisterExtensions.SetProperty' Property='QtExecCmdLine' 
    Value='"[INSTALLDIR]RegisterExtensionDotNet20_x86.exe" -i "[INSTALLDIR]LogicNP.EZShellExtensions.dll" "[INSTALLDIR]LogicNP.EZNamespaceExtensions.dll" "[INSTALLDIR]MyNse.dll"'/>

<CustomAction Id='RegisterExtensions' BinaryKey="WixCA" DllEntry="CAQuietExec" Execute="immediate" Return="check"/>

This has to be done also for 64 bit. I have separate 64 bit version of the custom action also:

<CustomAction Id='RegisterExtensions64.SetProperty' Property='QtExecCmdLine'
      Value='"[INSTALLDIR]RegisterExtensionDotNet20_x64.exe" -i "[INSTALLDIR]LogicNP.EZShellExtensions.dll" "[INSTALLDIR]LogicNP.EZNamespaceExtensions.dll" "[INSTALLDIR]MyNse.dll"'/>

<CustomAction Id='RegisterExtensions64' BinaryKey="WixCA" DllEntry="CAQuietExec" Execute="immediate" Return="check"/>

You have to schedule the registration process also into the WiX build file:

<Custom Action="RegisterExtensions.SetProperty" Before="RegisterExtensions">(NOT Installed)</Custom>
<Custom Action='RegisterExtensions' After="InstallFinalize">(NOT Installed)</Custom>
<Custom Action='RegisterExtensions64.SetProperty' Before='RegisterExtensions64'>(NOT Installed) AND (VersionNT64)</Custom>
  <Custom Action='RegisterExtensions64' After='RegisterExtensions'>(NOT Installed) AND (VersionNT64)</Custom>

A consequence is that you need to include the EZNamespaceExtension executables in your installer.

一身软味 2024-08-28 04:32:43

您需要添加命名空间扩展特定的注册表项才能使其正常工作。其中许多条目需要管理员权限。因此,除非用户允许提升,否则无法使用 UAC ON 进行安装。

You need to add namespace extension specific registry entries for it to work. Many of these entries require admin privileges. So installing with UAC ON is not possible unless the user allows elevation.

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