2017-02-06 4 views
0

私は自分のデスクトップアプリケーションのためのwixインストーラを作成しました。私はいくつかのカスタムアクションを追加しました。私の開発マシンでは正常に動作しますが、カスタムアクションはクライアントマシンで呼び出されません。カスタムアクションのクライアントマシンは動作しますか?または、Windowsインストーラーをマシンにインストールする必要がありますか? クライアントマシンにインストールした後は、アプリケーションの追加と削除にアプリケーションが表示されますので、カスタムアクションは呼び出されません.Wix 3.10.3.3007を使用しています。 は、カスタムアクションプロジェクトは、その設定ファイルの.NETフレームワーク4.5.Theの内容に基づいており、以下のとおりです。クライアントマシンでwixインストーラーを実行するには、そのマシンにwixフレームワークをインストールする必要がありますか?

<?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> 

EDIT-また、私が気づいたもう一つの事は、私が

のSetup.exe -l logfile.txtという

0123を実行したときにということです

私のマシンのログのコマンドでは、インストーラのUIが表示されますが、クライアントマシンではインストーラのUIは表示されません。


編集2 - 私は、ログファイルを見ていると、彼らは、カスタムアクションが呼び出されたことを示していると、彼らは私が書くためにそこにコードを追加していたとして、カスタムアクションのコードが実行されなかった1.But返さWriteRegistryValues:

アクション10時27分49秒に終了した:それはカスタムアクションが呼び出されたことを示し、ここで制御は、カスタムアクションfunction.Hereの最初の行に到達したログファイルには、インストーラのログからの抽出物です。戻り値1. MSI((8C:2C)[10:27:49:161]:処置:InstallSetPro MSI(8C:2C) [10:27:49:161]:注: 1:2205 2:3:ActionText Action 10:27:49: InstallSetPro。アクション開始10:27:49:InstallSetPro。 MSI(8C:2C) [10:27:49:161]:PROPERTY CHANGE:SectionNameプロパティを追加します。その の値は 'Install'です。アクションは10:27:49:InstallSetProで終了しました。戻り値 1. MSI(8C:2C)[10:27:49:161]:処置:MSIをインストールする(8C:2C)[10:27:49:161] :2205 2:3:ActionText Action 10:27:49:インストールします。アクション開始10:27:49:インストールします。 MSI(8C:C4) [10:27:49:208]:リモートカスタムアクションを呼び出す。 DLL: C:¥Windows¥Installer¥MSI77C0.tmp、Entrypoint:RegistryInstall MSI (8C:C0)[10:27:49:317]:ランダムなクッキーを生成する。 MSI(8C:C0) [10:27:49:348]:PID 5356(0x14EC)で作成されたカスタムアクションサーバー。 MSI(8C:34)[10:27:49:458]:サービスとして実行しています。こんにちは、私はあなたの32bit偽装カスタムアクション サーバーです。MSI(s)(8C:34) [10:27:49:458] SFXCA:一時ディレクトリにカスタムアクションを抽出: C:\ WINDOWS \ Installerの\ MSI77C0.tmp- \ SFXCA:! Installer_CustomActionsカスタムアクションを呼び出すv4.0.30319 CLRバージョン への結合Installer_CustomActions.CustomActions.RegistryInstall アクションは、10時27分に終了しました。 50:インストールします。戻り値1.

カスタムアクションプロジェクトでログを書き込むために参照しているDLLが問題を引き起こしている可能性がありますか?

答えて

0

問題はレジストリエントリにありました。カスタムアクションはレジストリを読み取ることができませんでした。したがって、適切にインストールされていませんでした。

0

いいえ、CAを実行するためにWiXをインストールする必要はありません。

私は、あなたのsetup.exeがバーンブートストラップであり、UIを実行してプライマリMSIにサイレントモードで動作するよう指示しているとします。

これらのカスタムアクションはすべて、実行コンテキストが不変の状態で実行されるように設定されています。それはおそらく誤ったデザインです。私は次のようになります。

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

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

私の推測では、あなたの条件は、あなたが考える方法を評価されていないと、カスタムアクションが実行されていないです。どちらか、または彼らは失敗し、エラーを飲み込んでいます。詳細については、ログファイルを参照する必要があります。

関連する問題