開発中のアプリケーション用にVS2005を使用してセットアッププロジェクトを作成しました。これはWindows2000およびXPに正常にインストールされますが、Vistaでインストーラーを実行しようとすると、次のエラーが発生します。
このWindowsインストーラパッケージに問題があります。このインストールを完了するために必要なプログラムを実行できませんでした。
このエラーは、インストールプロセスの最後、すべてのファイルをディスクにコピーした後、カスタムアクションの実行可能ファイルを実行しようとしたときに発生します。
カスタムアクションバイナリはInstallCustom.exeというファイルで、C++で記述されています。これは非常に基本的なものであり、インストール、コミット、アンインストール、およびロールバックアクションを処理するだけで、いくつかのレジストリエントリを設定し、いくつかのバッチスクリプトを実行してインストールを完了します。
インストール中にSXSTraceを実行して、何が失敗しているかを確認し、次のトレースを取得しました。
=================
Begin Activation Context Generation.
Input Parameter:
Flags = 0
ProcessorArchitecture = x86
CultureFallBacks = en-US;en
ManifestPath = C:\Program Files\MyApp\InstallCustom.exe
AssemblyDirectory = C:\Program Files\MyApp\
Application Config File =
-----------------
INFO: Parsing Manifest File C:\Program Files\MyApp\InstallCustom.exe.
INFO: Manifest Definition Identity is (null).
INFO: Reference: Microsoft.VC80.CRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="8.0.50727.4053"
INFO: Resolving reference Microsoft.VC80.CRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="8.0.50727.4053".
INFO: Resolving reference for ProcessorArchitecture x86.
INFO: Resolving reference for culture Neutral.
INFO: Applying Binding Policy.
INFO: Find publisher policy at C:\Windows\WinSxS\manifests\x86_policy.8.0.microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.1434_none_516c10c30f4aae68.manifest
INFO: No binding policy redirect found.
INFO: Begin assembly probing.
INFO: Did not find the assembly in WinSxS.
INFO: Attempt to probe manifest at C:\Windows\assembly\GAC_32\Microsoft.VC80.CRT\8.0.50727.4053__1fc8b3b9a1e18e3b\Microsoft.VC80.CRT.DLL.
INFO: Attempt to probe manifest at C:\Program Files\MyApp\Microsoft.VC80.CRT.DLL.
INFO: Attempt to probe manifest at C:\Program Files\MyApp\Microsoft.VC80.CRT.MANIFEST.
INFO: Attempt to probe manifest at C:\Program Files\MyApp\Microsoft.VC80.CRT\Microsoft.VC80.CRT.DLL.
INFO: Attempt to probe manifest at C:\Program Files\MyApp\Microsoft.VC80.CRT\Microsoft.VC80.CRT.MANIFEST.
INFO: Did not find manifest for culture Neutral.
INFO: End assembly probing.
ERROR: Cannot resolve reference Microsoft.VC80.CRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="8.0.50727.4053".
ERROR: Activation Context generation failed.
End Activation Context Generation.
=================
Begin Activation Context Generation.
Input Parameter:
Flags = 0
ProcessorArchitecture = x86
CultureFallBacks = en-US;en
ManifestPath = C:\Program Files\MyApp\InstallCustom.exe
AssemblyDirectory = C:\Program Files\MyApp\
Application Config File =
-----------------
INFO: Parsing Manifest File C:\Program Files\MyApp\InstallCustom.exe.
INFO: Manifest Definition Identity is (null).
INFO: Reference: Microsoft.VC80.CRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="8.0.50727.4053"
INFO: Resolving reference Microsoft.VC80.CRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="8.0.50727.4053".
INFO: Resolving reference for ProcessorArchitecture x86.
INFO: Resolving reference for culture Neutral.
INFO: Applying Binding Policy.
INFO: Find publisher policy at C:\Windows\WinSxS\manifests\x86_policy.8.0.microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.1434_none_516c10c30f4aae68.manifest
INFO: No binding policy redirect found.
INFO: Begin assembly probing.
INFO: Did not find the assembly in WinSxS.
INFO: Attempt to probe manifest at C:\Windows\assembly\GAC_32\Microsoft.VC80.CRT\8.0.50727.4053__1fc8b3b9a1e18e3b\Microsoft.VC80.CRT.DLL.
INFO: Attempt to probe manifest at C:\Program Files\MyApp\Microsoft.VC80.CRT.DLL.
INFO: Attempt to probe manifest at C:\Program Files\MyApp\Microsoft.VC80.CRT.MANIFEST.
INFO: Attempt to probe manifest at C:\Program Files\MyApp\Microsoft.VC80.CRT\Microsoft.VC80.CRT.DLL.
INFO: Attempt to probe manifest at C:\Program Files\MyApp\Microsoft.VC80.CRT\Microsoft.VC80.CRT.MANIFEST.
INFO: Did not find manifest for culture Neutral.
INFO: End assembly probing.
ERROR: Cannot resolve reference Microsoft.VC80.CRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="8.0.50727.4053".
ERROR: Activation Context generation failed.
End Activation Context Generation.
ご覧のとおり、VisualC++ランタイムdllであるMicrosoft.VC80.CRTが見つかりません。
奇妙なことに、このランタイムは、マージモジュール「Microsoft_VC80_CRT_x86.msm」と「policy_8_0_microsoft_vc80_crt_x86.msm」を追加することで、インストーラーにすでに含まれています。
ただし、これらのマージモジュールは、このエラーが発生するまで実際には適用されないのではないかと思います...しかし、InstallCustom.exeを実行する前に
、
これらの必要なファイルを含める方法を理解できませんでした。インストール前に、ファイルが存在するディレクトリにランタイムをコピーしてみました。
この問題を修正する方法はありますか?そして、なぜこれがXPと2000では問題にならないのか、Vistaでは問題になるのでしょうか...このランタイムが必要だと思います。