运行 客户端计算机上的 wix 安装程序是否需要在该计算机上安装 wix 框架?

Does running a wix installer on a client machine require installing the wix framework on that machine?

我已经为我的桌面创建了一个 wix 安装程序 application.I 已经向 it.The 添加了一些自定义操作 it.The 安装程序在我的开发机器上工作正常但是自定义操作在客户端上没有被调用 machine.So,我应该在客户端机器上安装 wix 框架以使自定义操作起作用吗?还是我必须在机器上安装 windows 安装程序? 请注意,在客户端计算机上安装后,应用程序确实会出现在添加或删除 programs.Just 自定义操作中 called.I am using wix 3.10.3.3007 。 自定义动作项目基于.net framework 4.5.The其配置文件内容如下:

<?xml version="1.0" encoding="utf-8" ?> <configuration>
    <startup useLegacyV2RuntimeActivationPolicy="true">

        <!--
          Use supportedRuntime tags to explicitly specify the version(s) of the .NET Framework runtime that
          the custom action should run on. If no versions are specified, the chosen version of the runtime
          will be the "best" match to what Microsoft.Deployment.WindowsInstaller.dll was built against.

          WARNING: leaving the version unspecified is dangerous as it introduces a risk of compatibility
          problems with future versions of the .NET Framework runtime. It is highly recommended that you specify
          only the version(s) of the .NET Framework runtime that you have tested against.

          Note for .NET Framework v3.0 and v3.5, the runtime version is still v2.0.

          In order to enable .NET Framework version 2.0 runtime activation policy, which is to load all assemblies 
          by using the latest supported runtime, @useLegacyV2RuntimeActivationPolicy="true".

          For more information, see http://msdn.microsoft.com/en-us/library/bbx34a2h.aspx
        -->

        <supportedRuntime version="v4.0" />
        <supportedRuntime version="v2.0.50727"/>

    </startup>

    <!--
      Add additional configuration settings here. For more information on application config files,
      see http://msdn.microsoft.com/en-us/library/kza1yk3a.aspx
    -->

</configuration>

此外,这里是在 Product.wxs 文件中调用自定义操作的代码:

  <CustomAction Id="UninstallSetPro"   Execute="immediate" Property="SectionName"  Value="Uninstall" />
    <CustomAction Id="InstallSetPro" Execute="immediate" Property="SectionName" Value="Install" />
    <CustomAction Id="Install" Return="check"  Execute="immediate"  BinaryKey="CustomAction_OutlookPlugin"  DllEntry="RegistryInstall"   />
    <CustomAction Id="Uninstall" Return="check"  Execute="immediate"  BinaryKey="CustomAction_OutlookPlugin"  DllEntry="RegistryInstall"   />
    <CustomAction Id="CopyOrderingFile" Return="check"  Execute="immediate"  BinaryKey="CustomAction_OutlookPlugin"  DllEntry="CopyOrderingFile"  />
    <CustomAction Id="ModifyConfigFile" Return="check"  Execute="immediate"  BinaryKey="CustomAction_OutlookPlugin"  DllEntry="modifyConfigFile"  />
    <CustomAction Id="AddInstallationParamToConfigFile" Return="check"  Execute="immediate"  BinaryKey="CustomAction_OutlookPlugin"  DllEntry="AddInstallationParametersToConfigFile"  />
    <InstallExecuteSequence>
      <Custom Action="InstallSetPro" After="WriteRegistryValues" >$ProductFiles&gt;2</Custom>
      <Custom Action="Install" After="InstallSetPro">$ProductFiles&gt;2</Custom>
      <Custom Action="CopyOrderingFile"  After="InstallFinalize">NOT Installed</Custom>
      <Custom Action="ModifyConfigFile"  After="InstallFinalize">NOT Installed</Custom>
      <Custom Action="AddInstallationParamToConfigFile"  After="ModifyConfigFile">NOT Installed</Custom>
      <Custom Action="UninstallSetPro" After="MsiUnpublishAssemblies" > $ProductFiles=2</Custom>
      <Custom Action="Uninstall" After="UninstallSetPro">$ProductFiles=2</Custom>
    </InstallExecuteSequence>

编辑-另外,我注意到的另一件事是当我 运行

Setup.exe -l LogFile.txt

我的机器上的日志命令,我能够看到安装程序 UI,但在客户端机器上安装程序 UI 不是 shown.It 静默安装它。


编辑 2 - 我已经看到了日志文件,它们显示调用了自定义操作并且它们返回 1.But 自定义操作中的代码没有执行,因为我在那里添加了代码以在控件到达第一个时写入日志文件自定义操作行 function.Here 是安装程序日志的摘录,其中显示调用了自定义操作:

Action ended 10:27:49: WriteRegistryValues. Return value 1. MSI (s) (8C:2C) [10:27:49:161]: Doing action: InstallSetPro MSI (s) (8C:2C) [10:27:49:161]: Note: 1: 2205 2: 3: ActionText Action 10:27:49: InstallSetPro. Action start 10:27:49: InstallSetPro. MSI (s) (8C:2C) [10:27:49:161]: PROPERTY CHANGE: Adding SectionName property. Its value is 'Install'. Action ended 10:27:49: InstallSetPro. Return value 1. MSI (s) (8C:2C) [10:27:49:161]: Doing action: Install MSI (s) (8C:2C) [10:27:49:161]: Note: 1: 2205 2: 3: ActionText Action 10:27:49: Install. Action start 10:27:49: Install. MSI (s) (8C:C4) [10:27:49:208]: Invoking remote custom action. DLL: C:\Windows\Installer\MSI77C0.tmp, Entrypoint: RegistryInstall MSI (s) (8C:C0) [10:27:49:317]: Generating random cookie. MSI (s) (8C:C0) [10:27:49:348]: Created Custom Action Server with PID 5356 (0x14EC). MSI (s) (8C:34) [10:27:49:458]: Running as a service. MSI (s) (8C:34) [10:27:49:458]: Hello, I'm your 32bit Impersonated custom action server. SFXCA: Extracting custom action to temporary directory: C:\Windows\Installer\MSI77C0.tmp-\ SFXCA: Binding to CLR version v4.0.30319 Calling custom action Installer_CustomActions!Installer_CustomActions.CustomActions.RegistryInstall Action ended 10:27:50: Install. Return value 1.

会不会是我在自定义操作项目中引用的用于写入日志的 dll 导致了问题?

不,您不需要将 WiX 安装到 运行 CA。

我假设您的 setup.exe 是一个刻录引导程序,它正在执行 UI 并告诉您的主 MSI 静默 运行。

我还注意到那些自定义操作在即时执行上下文中都设置为 运行。这可能是一个不正确的设计。我会读:

http://www.installsite.org/pages/en/isnews/200108/

Custom Action in C# used via WiX fails with error 1154

我猜你的条件没有评估你的想法,自定义操作也没有 运行ning。要么就是他们失败了,要么吞下了错误。您需要阅读日志文件以了解更多信息。

注册表有问题entry.The自定义操作无法读取注册表,因此安装不正确。