Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/wix/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用Microsoft WIX安装命名空间扩展_Wix_Namespaces_Wix3_Registration - Fatal编程技术网

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

使用Microsoft WIX安装命名空间扩展,wix,namespaces,wix3,registration,Wix,Namespaces,Wix3,Registration,使用wix安装命名空间扩展的最佳/最简单的方法是什么? 特别是如何在启用了UAC的Windows 7上安装它。您需要添加特定于命名空间扩展的注册表项才能使其工作。其中许多条目需要管理员权限。因此,除非用户允许提升,否则在UAC打开的情况下安装是不可能的。我通过使用WiX中的内置自定义操作解决了这个问题,在运行自定义操作之前,您只需设置命令行选项。下面是我们如何做到这一点的示例: <CustomAction Id='RegisterExtensions.SetProperty' Proper

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

您需要添加特定于命名空间扩展的注册表项才能使其工作。其中许多条目需要管理员权限。因此,除非用户允许提升,否则在UAC打开的情况下安装是不可能的。

我通过使用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>
(未安装)
(未安装)
(未安装)和(版本NT64)
(未安装)和(版本NT64)

因此,您需要在安装程序中包含EZNamespaceExtension可执行文件。

我已将wix配置为需要提升权限。我正在尝试为其创建安装程序的命名空间扩展使用您的EZNamespaceExtension。可以使用自动注册吗?还是我必须找到所有必要的注册表项?谢谢你的帮助。我只是希望它会更简单;-)在Windows上安装时,我们都希望这样,但每次我都会被打到脸上:-)