PDA

View Full Version : HOWTO: Abort an Install Conditionally



Support
10-24-2002, 03:28 PM
<HTML><HEAD><TITLE>HOWTO: Abort an Install Conditionally</TITLE></HEAD><BODY><h3>HOWTO Abort an Install Conditionally</h3><b>Document ID: IR02035</b><hr>The information in this article applies to:<ul><li>Setup Factory 6.0</li></ul><hr><h3>SUMMARY</h3><p>This article describes how to abort an installation conditionally in Setup Factory 6.0.</p><h3>DISCUSSION</h3><p>It is always a good development practice to safeguard your install against as many potential failures as possible by forcing the user to abort the install if certain conditions are not met. In the end this will result in less frustration for the end users and the developers supporting the install.</p><p>Setup Factory 6.0 contains a series of pre-made screens all of which can be found in the <i>Screen Gallery</i>. You can get to the <i>Screen Gallery</i> dialog by first bringing up the <i>Screens</i> dialog via the menu under: <b>Design | Screens</b>, and then pressing the <b>Add</b> button. One of the pre-made screens is the <b>Abort Install</b> screen. This is the screen that you will use to abort the install if certain conditions are not met.</p><p>To add the <b>Abort Install</b> screen to your screen list, double-click it, or select it and press the <b>Ok</b> button.</p><p><b>Note:</b> If you are performing compatibility checks (i.e. Does the user have administrative privileges?) it is a good idea to place the <b>Abort Install</b> either first or second, in your "Before Installing" screens list.</p><p>Once you have the <b>Abort Screen</b> in your screen list, and positioned properly, double-click on it to view it's properties. On the Settings tab you will see a section labeled <b>Screen Condition</b>. A screen condition is simply a conditional expression that determines whether a screen will be hidden or displayed at run time. If the expression is blank, or evaluates to a true result, the screen will be shown. If the expression evaluates to a false result, the screen will not be shown.</p><p>You can type an expression directly into the Screen Condition field, or you can press the <b>Build</b> button to build the expression with the help of the <i>Build Expression</i> dialog.</p><p>In the case of the <b>Abort Install</b> screen, if it is displayed during the install it will abort once the end user presses the <b>Close</b> button.</p><p>Once you have entered your screen condition you will have to edit the text that will be displayed on the screen. Edit the text on the Custom tab in the <b>Text</b> field. You should usually tell the user why the installation is being aborted, and what they can do about it. It might also be a good idea to include a technical support e-mail address or phone number they can use.</p><p>Here is a list of common situations when you might want to abort your installation, and what the screen condition to accomplish this might look like.</p><table cellspacing="2" cellpadding="2" border="2" frame="box"><th>Situation</th><th>Screen Condition</th><tr> <td>User does not have Administrative permissions.</td> <td>(!%IsUserNTAdmin%)</td></tr><tr> <td>The user is on an incorrect operating system (e.g. Windows 95)</td> <td>(%IsWindows95)</td></tr><tr> <td>The user does not have a specific amount of RAM (e.g. 128)</td> <td>(%SystemRAM% &amp;lt; 128)</td></tr><tr> <td>The user is attempting to run the installation on a date later than allowed (e.g. The setup has expired)</td> <td>(%JulianDate% &amp;gt; 2453006)</td></tr></table><p><b>Note: </b>In the last example you would have to replace 2453006 with the Julian date that you wanted your setup to expire on.</p><h3>MORE INFORMATION</h3><p>For more information please see the following topics in the Setup Factory 6.0 help file.</p><li><b>Command Reference | Screens | Individual Screens | Abort Install</b></li><li><b>Command Reference | Design Environment | Dialogs | Screens | Screens Dialog</b></li><li><b>Command Reference | Variables | Built-in Variables</b></li><li><b>Command Reference | Reference | Boolean Values</b></li><li><b>Command Reference | Reference | Conditional Expressions</b></li><p>KEYWORDS: Setup Factory 6.0, Abort, Screen Condition, Condition</p><hr><FONT SIZE=1>Last reviewed: February 20, 2003
<br>Copyright 2003 <A HREF="http://www.indigorose.com" target="blank">Indigo Rose Corporation</a>. All rights reserved.
<br></FONT></BODY></HTML>