我最近完成了我的第一个Wix Intaller,但是我有一个问题,我的MSI文件只适用于我的电脑,我正在生成嵌入式CAB文件。我正在注册安装程序中的DLL。我收到错误信息:“这个Windows安装程序包存在问题,作为安装程序运行的程序未按预期完成。”这就是为什么我相信DLL是问题的一部分。我在下面有一些代码片段,如果您需要查看更多,请告诉我,谢谢!Wix MSI只适用于一台计算机
自定义操作DLL安装:
<Product Id="*" UpgradeCode="12345678-1234-1234-1234-111111111111"
Name="FP7000 Camera App" Version="1.0" Manufacturer="Stryker Corp" Language="1033">
<Package InstallerVersion="200" Compressed="yes" Comments="Windows Installer Package"/>
<Media Id="1" Cabinet="product.cab" EmbedCab="no"/>
<!--Installing/Uninstalling Supporting Programs and DLLs-->
<CustomAction Id="RegisterFP7000"
Directory="dirCF50D58BC65CC93005501980AACC3EDD"
ExeCommand='C:\Windows\system32\regsvr32.exe /s "C:\Projects\Stryker\Install Files\DLLs\FP7000-Camera.dll"'>
</CustomAction>
<CustomAction Id="UnregisterFP7000"
Directory="dirCF50D58BC65CC93005501980AACC3EDD"
ExeCommand='C:\Windows\system32\regsvr32.exe /s /u "C:\Projects\Stryker\Install Files\DLLs\FP7000-Camera.dll"'>
</CustomAction>
<CustomAction Id="InstallSDK"
Directory="dirCF50D58BC65CC93005501980AACC3EDD"
ExeCommand='C:\Windows\system32\msiexec /i "C:\Projects\Stryker\Install Files\Included Apps\Intel_Media_SDK_2016_R2.msi" /quiet'
Execute='deferred'
Impersonate='no'
Return='asyncNoWait'>
</CustomAction>
<CustomAction Id="UninstallSDK"
Directory="dirCF50D58BC65CC93005501980AACC3EDD"
ExeCommand='MsiExec.exe /X{C39967EA-A3DB-4B49-9BCA-74E4D0007533}'
Execute='deferred'
Impersonate='no'
Return='asyncNoWait'>
</CustomAction>
安装顺序:
<InstallExecuteSequence>
<Custom Action="RegisterFP7000" After="InstallFinalize">NOT Installed</Custom>
<Custom Action="UnregisterFP7000" Before="InstallFinalize">REMOVE="ALL"</Custom>
<Custom Action="InstallSDK" After="InstallFiles">NOT Installed</Custom>
<Custom Action="UninstallSDK" Before="InstallFinalize">REMOVE="ALL"</Custom>
</InstallExecuteSequence>
一般而言,您可以通过查找引用错误的详细MSI日志中的部分来提出有关Windows Installer错误的更好的问题。然后你就会知道什么是失败的,并且可能会提出更多尖锐的问题。 –
生病请记住! –