Thank you! It turns out that "session.Message(InstallMessage.Error, record);" 
was sufficient enough for my needs, as it displays a messagebox with a bit an 
error text of my choosing -- will make users more understanding of the "ended 
prematurely"-message.
 
Best Regards,
 
Tom
 
> From: jocoo...@jackhenry.com
> To: wix-users@lists.sourceforge.net
> Date: Tue, 30 Jul 2013 15:26:08 +0000
> Subject: Re: [WiX-users] How do I show an error message? (Instead of  "Ended  
> Prematurely")
> 
> No, you probably need to:
> 
> 1) log a message;
> 2) display an error dialog;
> 3) display some action text;
> 
> It's not really a function of the particular UI you're choosing since any 
> dialog boxes you're going to pop are going to display because of spawning and 
> not scheduling.
> 
> But it isn't going to happened automatically.  You need to choose your 
> approach first.
> 
> --
> John Merryweather Cooper
> Build & Install Engineer - ESA
> Jack Henry & Associates, Inc.®
> Shawnee Mission, KS  66227
> Office:  913-341-3434 x791011
> jocoo...@jackhenry.com
> www.jackhenry.com 
> 
> 
> 
> 
> -----Original Message-----
> From: Tom - [mailto:mittegetm...@hotmail.com] 
> Sent: Tuesday, July 30, 2013 10:09 AM
> To: wix-users@lists.sourceforge.net
> Subject: [WiX-users] How do I show an error message? (Instead of "Ended 
> Prematurely")
> 
> Good afternoon,
>  
> I've got a series of custom actions that can each present reason for a failed 
> installation. I am currently getting "the installation completed/failed 
> prematurely" or what it says when something fails. I like that screen, but I 
> would like to show my own text for why it failed: SQL Server was down, 
> database was missing, database access denied, and so forth. I am not sure 
> which WXS-file is the relevant here. This is the customized user interface 
> based on Mondo (don't know if it's so customized):
>  
> <?xml version="1.0" encoding="UTF-8"?>
> <!--
>  <copyright file="WixUI_Mondo.wxs" company="Outercurve Foundation">
>    Copyright (c) 2004, Outercurve Foundation.
>    This software is released under Microsoft Reciprocal License (MS-RL).
>    The license and further copyright text can be found in the file
>    LICENSE.TXT at the root directory of the distribution.
>  </copyright>
> -->
> <!--
> First-time install dialog sequence:
> - WixUI_WelcomeDlg
> - WixUI_LicenseAgreementDlg
> - WixUI_SetupTypeDlg
> - WixUI_VerifyReadyDlg
> - WixUI_CustomizeDlg
> - WixUI_DiskCostDlg
> - WixUI_BrowseDlg
> Maintenance dialog sequence:
> - WixUI_MaintenanceWelcomeDlg
> - WixUI_MaintenanceTypeDlg
> - WixUI_CustomizeDlg
> - WixUI_VerifyReadyDlg
> Patch dialog sequence:
> - WixUI_WelcomeDlg
> - WixUI_VerifyReadyDlg
> -->
> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi";>
>   <Fragment>
>     <UI Id="WixUI_MYAPP">
>       <TextStyle Id="WixUI_Font_Normal" FaceName="Tahoma" Size="8" />
>       <TextStyle Id="WixUI_Font_Bigger" FaceName="Tahoma" Size="12" />
>       <TextStyle Id="WixUI_Font_Title" FaceName="Tahoma" Size="9" Bold="yes" 
> />
>       <Property Id="DefaultUIFont" Value="WixUI_Font_Normal" />
>       <Property Id="WixUI_Mode" Value="Mondo" />
>       <DialogRef Id="ErrorDlg" />
>       <DialogRef Id="FatalError" />
>       <DialogRef Id="FilesInUse" />
>       <DialogRef Id="MsiRMFilesInUse" />
>       <DialogRef Id="PrepareDlg" />
>       <DialogRef Id="ProgressDlg" />
>       <DialogRef Id="ResumeDlg" />
>       <DialogRef Id="UserExit" />
>       <Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" 
> Value="Return" Order="999">1</Publish>
>       <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" 
> Value="LicenseAgreementDlg">NOT Installed AND NOT PATCH</Publish>
>       <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" 
> Value="VerifyReadyDlg">Installed AND PATCH</Publish>
>       <Publish Dialog="LicenseAgreementDlg" Control="Back" Event="NewDialog" 
> Value="WelcomeDlg">1</Publish>
>       <Publish Dialog="LicenseAgreementDlg" Control="Next" Event="NewDialog" 
> Value="VerifyReadyDlg" Order="2">LicenseAccepted = "1"</Publish>
>       <Publish Dialog="SetupTypeDlg" Control="Back" Event="NewDialog" 
> Value="LicenseAgreementDlg">1</Publish>
>       <Publish Dialog="SetupTypeDlg" Control="TypicalButton" 
> Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
>       <Publish Dialog="SetupTypeDlg" Control="CustomButton" Event="NewDialog" 
> Value="CustomizeDlg">1</Publish>
>       <Publish Dialog="SetupTypeDlg" Control="CompleteButton" 
> Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
>       <Publish Dialog="CustomizeDlg" Control="Back" Event="NewDialog" 
> Value="MaintenanceTypeDlg" Order="1">WixUI_InstallMode = "Change"</Publish>
>       <Publish Dialog="CustomizeDlg" Control="Back" Event="NewDialog" 
> Value="SetupTypeDlg" Order="2">WixUI_InstallMode = "InstallCustom"</Publish>
>       <Publish Dialog="CustomizeDlg" Control="Next" Event="NewDialog" 
> Value="VerifyReadyDlg">1</Publish>
>       <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" 
> Value="CustomizeDlg" Order="1">WixUI_InstallMode = "InstallCustom"</Publish>
>       <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" 
> Value="SetupTypeDlg" Order="2">WixUI_InstallMode = "InstallTypical" OR 
> WixUI_InstallMode = "InstallComplete"</Publish>
>       <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" 
> Value="CustomizeDlg" Order="3">WixUI_InstallMode = "Change"</Publish>
>       <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" 
> Value="MaintenanceTypeDlg" Order="4">WixUI_InstallMode = "Repair" OR 
> WixUI_InstallMode = "Remove"</Publish>
>       <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" 
> Value="WelcomeDlg" Order="2">WixUI_InstallMode = "Update"</Publish>
>       <Publish Dialog="MaintenanceWelcomeDlg" Control="Next" 
> Event="NewDialog" Value="MaintenanceTypeDlg">1</Publish>
>       <Publish Dialog="MaintenanceTypeDlg" Control="ChangeButton" 
> Event="NewDialog" Value="CustomizeDlg">1</Publish>
>       <Publish Dialog="MaintenanceTypeDlg" Control="RepairButton" 
> Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
>       <Publish Dialog="MaintenanceTypeDlg" Control="RemoveButton" 
> Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
>       <Publish Dialog="MaintenanceTypeDlg" Control="Back" Event="NewDialog" 
> Value="MaintenanceWelcomeDlg">1</Publish>
>     </UI>
>     <UIRef Id="WixUI_Common" />
>   </Fragment>
> </Wix>
>  
> And this would be the slightly meatier Product.wxs:
>  
> <?xml version="1.0" encoding="UTF-8"?>
> <?include Definitions/Product.wxi ?>
> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"; 
> xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension";>
>   <Product Id="*" Name="MyAppName" Language="1033" 
> Version="$(var.ProductVersion)" Manufacturer="RemovedCompanyName" 
> UpgradeCode="17652B67-2C4F-4752-88CE-0E300DEA4C2F">
>     <Package 
>       InstallerVersion="200" 
>       Compressed="yes" 
>       InstallScope="perMachine" 
>       InstallPrivileges="elevated"
>       Manufacturer="RemovedCompanyName" 
>       Platform="x86"
>        />
>     
>     <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is 
> already installed."/>
>     
>     <!-- BEGIN: License Agreement -->
>     <WixVariable Id="WixUILicenseRtf" 
> Value="SetupResources/LicenseAgreement.rtf" />
>     
>     <!-- BEGIN: UI Bitmaps -->
>     <WixVariable Id="WixUIBannerBmp" 
> Value="SetupResources/WiXDefBannerBitmap.bmp" />
>     <WixVariable Id="WixUIDialogBmp" 
> Value="SetupResources/WiXDefDialogBitmap.bmp" />
>     <!-- BEGIN: Custom Actions -->
>     <CustomAction Id='validateSqlServer' BinaryKey='customActions' 
> DllEntry='ValidateSqlServer' />
>     <CustomAction Id='validateTpdb' BinaryKey='customActions' 
> DllEntry='ValidateTpdb' />
>     <CustomAction Id='validateProductDb' BinaryKey='customActions' 
> DllEntry='ValidateProductDb' />
>     <CustomAction Id='tryUpdateTpdb' BinaryKey='customActions' 
> DllEntry='TryUpdateTpdb' />
>     <CustomAction Id='hasLegacyProduct' BinaryKey='customActions' 
> DllEntry='HasLegacyProduct' />
>     
>     <Binary Id='customPaActions' 
> SourceFile='D:\TFS\MyAppName\Main\Src\MyAppName\WiX Custom 
> Actions\CustomActions.CA.dll' />
>         
>     <!-- BEGIN: Single MSI -->
>     <MediaTemplate EmbedCab="yes" />
>     <!-- BEGIN: Application Icon -->
>     <Icon Id="appicon.ico" SourceFile="SetupResources/appicon.ico"/>
>     <!-- BEGIN: .NET Version Launch Condition -->
>     <PropertyRef Id="NETFRAMEWORK45" />
>     <Condition Message="You must install Microsoft .NET 4.5">
>       <![CDATA[Installed OR NETFRAMEWORK45]]>
>     </Condition>
>     <InstallExecuteSequence>
>       <Custom Action="hasLegacyProduct" Before="validateSqlServer">NOT 
> Installed</Custom>
>       <Custom Action="validateSqlServer" Before="validateProductDb">NOT 
> Installed</Custom>
>       <Custom Action="validateProductDb" Before="validateTpdb">NOT 
> Installed</Custom>
>       <Custom Action="validateTpdb" Before="tryUpdateTpdb">NOT 
> Installed</Custom>
>       <Custom Action="tryUpdateTpdb" Before="InstallFinalize">NOT 
> Installed</Custom>
>     </InstallExecuteSequence>
> 
>     <!-- BEGIN: File System -->
>     <Directory Id="TARGETDIR" Name="SourceDir">
>       <Directory Id="ProgramFilesFolder">
>         <Directory Id="CompanyFolder" Name="RemovedCompanyName">
>           <Directory Id="INSTALLDIRECTORY" Name="MyAppName 
> $(var.ProductVersion)">
>             <Directory Id="Cache" Name="Cache">
>               <Directory Id="Images" Name="Images">
>               </Directory>
>             </Directory>
>             <Directory Id="Help" Name="Help"/>
>           </Directory>
>         </Directory>
>       </Directory>
>       <Directory Id="DesktopFolder" Name="Desktop"></Directory>
>       <Directory Id="StartMenuFolder" Name="StartMenu"></Directory>
>       <Directory Id="StartupFolder" Name="StartUp"></Directory>
>       <Directory Id='AppDataFolder' Name='Roaming'>
>         <Directory Id="RemovedCompanyNameFolder" Name="RemovedCompanyName">
>           <Directory Id='MyAppFolder' Name='MyAppName'>
>             <Directory Id='SettingsFolder' Name='Settings'/>
>             <Directory Id='ErrorFolder' Name='Error'/>
>             <Directory Id='CacheFolder' Name='Cache'/>
>             <Directory Id='LogFolder' Name='Log'/>
>           </Directory>
>         </Directory>
>       </Directory>
>       <Directory Id="ProgramMenuFolder">
>         <Directory Id="ApplicationProgramsFolder" Name="MyAppName 
> $(var.ProductVersion)"/>
>       </Directory>
>     </Directory>
>     <!-- BEGIN: Features -->
>     <Feature Id="ProductFeature" ConfigurableDirectory="TARGETDIR" Level="1">
>       <ComponentGroupRef Id="Shortcuts"/>
>       <ComponentGroupRef Id="ProductComponents.Help" />
>       <ComponentGroupRef Id="ProductComponents.Images" />
>       <ComponentGroupRef Id="ProductComponents.RoamingFolders" />
>       <ComponentGroupRef Id="HeatBinaryFiles" />
>     </Feature>
>     
>     <!-- BEGIN: Add/Remove Programs Icon -->
>     <Property Id="ARPPRODUCTICON" Value="appicon.ico" />
>     
>     <!-- BEGIN: User Interface -->
>     <UIRef Id="WixUI_MYAPP" />
>  
>   </Product>
> </Wix>
>  
> Essentially, I'd like to communicate a friendly error message back to the 
> "ended prematurely"-screen that currently comes up when an error occurs. Not 
> sure whether I've got it set up correctly in the above, or I need to make a 
> call to a method of sorts in the Custom Action besides signaling 
> ActionResult.Failure.
>  
> Best Regards,
>  
> Tom
>                                         
> ------------------------------------------------------------------------------
> Get your SQL database under version control now!
> Version control is standard for application code, but databases havent caught 
> up. So what steps can you take to put your SQL databases under version 
> control? Why should you start doing it? Read more to find out.
> http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
> NOTICE: This electronic mail message and any files transmitted with it are 
> intended
> exclusively for the individual or entity to which it is addressed. The 
> message, 
> together with any attachment, may contain confidential and/or privileged 
> information.
> Any unauthorized review, use, printing, saving, copying, disclosure or 
> distribution 
> is strictly prohibited. If you have received this message in error, please 
> immediately advise the sender by reply email and delete all copies.
> 
> 
> ------------------------------------------------------------------------------
> Get your SQL database under version control now!
> Version control is standard for application code, but databases havent 
> caught up. So what steps can you take to put your SQL databases under 
> version control? Why should you start doing it? Read more to find out.
> http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
                                          
------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent 
caught up. So what steps can you take to put your SQL databases under 
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to