c# - How to customize the Error screen in an MSI installer? -
in vs 2008 setup/deployment project, there way add custom error dialog (or customize existing one) handle errors encountered during installation process?
if understand correctly:
not software but, can handle errors software's prerequisites cause errors of time. must first go location of prerequisite package file. normally, "c:\program files\microsoft sdks\windows\v6.0a\bootstrapper\packages\". find package folder, move in, there folder named "en" , inside there xml file named "package.xml". open text editor , see:
<installchecks> <registrycheck property="dotnet35sp" key="hklm\software\microsoft\net framework setup\ndp\v3.5" value="sp" /> </installchecks> <!-- defines how invoke setup .net framework redist --> <commands reboot="defer"> <command packagefile="dotnetfx35setup.exe" arguments=' /lang:enu /passive /norestart' estimatedinstalledbytes="30000000" estimatedtempbytes="30000000"> <!-- these checks determine whether package installed --> <installconditions> <!-- indicates .net framework installed --> <bypassif property="dotnet35sp" compare="valuegreaterthanorequalto" value="1"/> <!-- block install if user not have admin privileges --> <failif property="adminuser" compare="valueequalto" value="false" string="adminrequired"/> <!-- block install on less windows xp sp2 --> <failif property="versionnt" compare="versionlessthan" value="5.1.2" string="invalidplatformwinnt"/> <!-- block install on w2k3 no service pack --> <failif property="versionnt" compare="versionequalto" value="5.2.0" string="invalidplatformwinnt"/> <!-- block install if platform 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 localizable string table error messages--> <strings> <string name="displayname">.net framework 3.5 sp1</string> <string name="culture">en</string> <string name="adminrequired">administrator permissions required install .net framework 3.5 sp1. contact administrator.</string> <string name="invalidplatformwinnt">installation of .net framework 3.5 sp1 requires windows xp sp2, windows 2003 sp1, windows vista, or later. contact application vendor.</string> <string name="invalidplatformarchitecture">this version of .net framework 3.5 sp1 not supported on ia-64 operating system. contact application vendor.</string> <string name="usercancelled">the user has cancelled installation. .net framework 3.5 sp1 has not been installed.</string> <string name="generalfailure">a failure occurred attempting install .net framework 3.5 sp1.</string> <string name="dotnetfx35sp1exe">http://go.microsoft.com/fwlink/?linkid=118076</string> </strings>
between "installconditions" tags, can add/remove conditions prerequisite's install.then between "strings" tags, can customize error messages.
for more info: http://msdn.microsoft.com/en-us/library/ms229223.aspx
Comments
Post a Comment