在VS 2008安裝/部署項目中,是否有任何添加自定義錯誤對話框(或自定義現有錯誤)的方法來處理安裝過程中遇到的錯誤?如何自定義MSI安裝程序中的錯誤屏幕?
2
A
回答
0
您可以添加額外的對話框,但我不認爲有一種方法可以將錯誤重定向到它們。有了Studio安裝項目,我認爲你會陷入內置的錯誤處理。
您需要使用InstallShield等第三方產品,或者手動編輯安裝程序(MSI)以獲得所需的功能。
1
如果我理解正確:
不完全是你的軟件,但是,你可以處理你的軟件的先決條件造成的大部分時間錯誤的錯誤。您必須先到達必備軟件包文件的位置。通常情況下,這將是「C:\ Program Files \ Microsoft SDKs \ Windows \ v6.0A \ Bootstrapper \ Packages \」。找到你的軟件包文件夾,進入,有一個名爲「en」的文件夾,裏面有一個名爲「package.xml」的xml文件。用文本編輯器打開它,你會看到:
<InstallChecks>
<RegistryCheck Property="DotNet35SP" Key="HKLM\Software\Microsoft\NET Framework Setup\NDP\v3.5" Value="SP" />
</InstallChecks>
<!-- Defines how to invoke the setup for .NET Framework redist -->
<Commands Reboot="Defer">
<Command PackageFile="dotNetFx35setup.exe"
Arguments=' /lang:enu /passive /norestart'
EstimatedInstalledBytes="30000000"
EstimatedTempBytes="30000000">
<!-- These checks determine whether the package is to be installed -->
<InstallConditions>
<!-- This indicates .NET Framework is already installed -->
<BypassIf Property="DotNet35SP" Compare="ValueGreaterThanOrEqualTo" Value="1"/>
<!-- Block install if user does not have admin privileges -->
<FailIf Property="AdminUser" Compare="ValueEqualTo" Value="false" String="AdminRequired"/>
<!-- Block install on less than Windows XP SP2 -->
<FailIf Property="VersionNT" Compare="VersionLessThan" Value="5.1.2" String="InvalidPlatformWinNT"/>
<!-- Block install on W2K3 with no service pack -->
<FailIf Property="VersionNT" Compare="VersionEqualTo" Value="5.2.0" String="InvalidPlatformWinNT"/>
<!-- Block install if the platform is IA-64 -->
<FailIf Property="ProcessorArchitecture" Compare="ValueEqualTo" Value="IA64" String="InvalidPlatformArchitecture" />
</InstallConditions>
<ExitCodes>
<ExitCode Value="0" Result="Success"/>
<ExitCode Value="1602" Result="Fail" String="UserCancelled"/>
<ExitCode Value="1603" Result="Fail" String="GeneralFailure"/>
<ExitCode Value="3010" Result="SuccessReboot"/>
<DefaultExitCode Result="Fail" FormatMessageFromSystem="true" String="GeneralFailure" />
</ExitCodes>
</Command>
</Commands>
<!-- Defines a localizable string table for error messages-->
<Strings>
<String Name="DisplayName">.NET Framework 3.5 SP1</String>
<String Name="Culture">en</String>
<String Name="AdminRequired">Administrator permissions are required to install .NET Framework 3.5 SP1. Contact your administrator.</String>
<String Name="InvalidPlatformWinNT">Installation of the .NET Framework 3.5 SP1 requires Windows XP SP2, Windows 2003 SP1, Windows Vista, or later. Contact your application vendor.</String>
<String Name="InvalidPlatformArchitecture">This version of the .NET Framework 3.5 SP1 is not supported on an IA-64 operating system. Contact your application vendor.</String>
<String Name="UserCancelled">The user has cancelled the installation. .NET Framework 3.5 SP1 has not been installed.</String>
<String Name="GeneralFailure">A failure occurred attempting to install .NET Framework 3.5 SP1.</String>
<String Name="DotNetFX35SP1Exe">http://go.microsoft.com/fwlink/?linkid=118076</String>
</Strings>
的「InstallConditions」標記之間,您可以在「弦」標記之間爲前提的install.Then添加/刪除條件,您可以自定義錯誤消息。
欲瞭解更多信息:http://msdn.microsoft.com/en-us/library/ms229223.aspx
相關問題
- 1. VS.NET MSI安裝程序屏幕自定義
- 2. Msi自定義操作安裝程序:錯誤1001
- 3. MSi安裝錯誤
- 4. 如何在msi安裝程序中調整自定義對話框?
- 5. 自定義安裝程序
- 6. .msi安裝程序中斷
- 7. 如何在VS2010創建MSI安裝程序自定義的許可有效
- 8. 觀察MSI安裝程序如何安裝應用程序
- 9. 如何將msi插入到自定義Windows安裝中?
- 10. 如何從我的MSI安裝程序中安裝WinPCAP?
- 11. 錯誤而MSI安裝包
- 12. 如何終止使用vbscript自定義動作的msi安裝
- 13. 如何安裝引導程序和MSI
- 14. DNN自定義身份驗證提供程序安裝錯誤
- 15. Windows安裝程序自定義操作錯誤1631
- 16. 無法在MSI安裝程序的自定義操作中寫入註冊表
- 17. 如何自定義應用程序的iPad圖標主屏幕?
- 18. msi安裝程序卸載
- 19. MSI安裝程序VS 2008
- 20. Windows安裝程序msi包
- 21. 如何使用自定義操作安裝第三方MSI?
- 22. 有一次Android安裝程序屏幕?
- 23. 在MSI安裝程序中使用C#創建自定義對話框
- 24. MySQL Installer-community-5.6.21.1.msi上的MySQL安裝程序錯誤
- 25. 由vsixinstaller錯誤「1009」阻止的Msi安裝程序:InstallByMsiException
- 26. MSI自動安裝
- 27. 如何以編程方式安裝屏幕保護程序?
- 28. 如何使用Inno Setup安裝程序升級MSI安裝?
- 29. 使用msi安裝程序的安裝程序windows服務
- 30. 在安裝程序項目中添加安裝msi之前的自定義操作