我正在创建一个示例msi。我正在使用C ++自定义操作。我可以在Windows 7 32bit上安装msi。但我无法在Windows Server 2008 64bit上安装它。
以下是代码:
<Binary Id="BinaryId.dll"
SourceFile="Test.dll" />
<CustomAction Id="TestFunc" BinaryKey="BinaryId" DllEntry="TestFunc"
Execute="immediate" Return="check" />
<InstallExecuteSequence>
<Custom Action="TestFunc" Before="InstallInitialize" Overridable="yes">1</Custom>
</InstallExecuteSequence>
我从msi日志中收到以下错误:
Invoking remote custom action. DLL: C:\Windows\Installer\MSI84EB.tmp, Entrypoint: MSI (s) (8C:30) [01:28:17:180]: Doing action: TestFunc MSI (s) (8C:30) [01:28:17:180]: Note: 1: 2205 2: 3: ActionText Action start 1:28:17: TestFunc. MSI (s) (8C:A0) [01:28:17:184]: Invoking remote custom action. DLL: C:\Windows\Installer\MSI8E90.tmp, Entrypoint: TestFunc CustomAction TestFunc returned actual error code 1157 (note this may not be 100% accurate if translation happened inside sandbox) MSI (s) (8C:30) [01:28:17:218]: Note: 1: 1723 2: TestFunc3: TestFunc4: C:\Windows\Installer\MSI8E90.tmp MSI (s) (8C:30) [01:28:17:218]: Note: 1: 2205 2: 3: Error MSI (s) (8C:30) [01:28:17:218]: Note: 1: 2228 2: 3: Error 4: SELECT `Message` FROM `Error` WHERE `Error` = 1723 MSI (c) (1C:74) [01:28:17:224]: Font created. Charset: Req=0, Ret=0, Font: Req=MS Shell Dlg, Ret=MS Shell Dlg Error 1723. There is a problem with this Windows Installer package. A DLL required for this install to complete could not be run. Contact your support personnel or package vendor. Action TestFunc, entry: TestFunc, library: C:\Windows\Installer\MSI8E90.tmp MSI (s) (8C:30) [01:28:18:451]: Note: 1: 2205 2: 3: Error MSI (s) (8C:30) [01:28:18:451]: Note: 1: 2228 2: 3: Error 4: SELECT `Message` FROM `Error` WHERE `Error` = 1709 MSI (s) (8C:30) [01:28:18:451]: Product: TestCa -- Error 1723. There is a problem with this Windows Installer package. A DLL required for this install to complete could not be run. Contact your support personnel or package vendor. Action TestFunc, entry: TestFunc, library: C:\Windows\Installer\MSI8E90.tmp
非常感谢您提出的宝贵建议和帮助,以便解决此问题。 :)
答案 0 :(得分:1)
看一下使用自定义操作方法TestFunc的内容。 1157错误意味着:
运行此应用程序所需的库文件之一不能 找到。
因此,您可能正在使用某些在Windows Server 2008 64位上不可用但在Windows 7 32位上可用的库。
答案 1 :(得分:0)
在托管的.Net代码中编写自定义操作并不容易,需要手动操作项目文件。如果您可以在VB脚本,JavaScript或C ++中轻松编写相同的代码,我建议您改用该路径。
以下是我使用的教程:Creating Custom Action for WIX Written in Managed Code without Votive。