In many cases the path that an end-user will take through an installer depends on the choices made in different steps within the installation procedure. InstallAnywhere provides methods to gather input from end-users, which you can leverage to control your installation.
In this first example, we'll return to an action we added to our OfficeSuite installer, the Execute action added in the Post-Install task.
Generally, it's nice to ask the end-user if they would like to launch the application when the installation is complete. In order to add this functionality, we'll need both a method to ask if the end-user would like to launch the application and a method by which we can control that action.
In previous sections, we've seen the rules methods that can be used to prevent the installer from displaying certain panels, and we've learned a little about the InstallAnywhere variable architecture that is used to store information within the installer.
In this exercise, we'll put the two together in a useful manner.
1. | Open the Post-Install task of the project. Later we'll actually create some new projects, but for now we'll continue to use and abuse our OfficeSuite installer. |
2. | Open the action palette and from the Panels tab, click Panel: Get User Input—Simple. The Get User Input—Simple panel allows you to retrieve a single type of information from the end-user and store it in a single InstallAnywhere variable for later use. The panel allows input to be entered via text fields, choice menus, pop-up menus, radio buttons, or check boxes. |
3. | Define and configure the panel.
|
f. | Now click twice in the Default Value field to the right, then choose Selected. |
4. | Create the “No” message for the panel.
|
5. | Set the Results variable to $LAUNCH_APPLICATION$. The default Results variable is $USER_INPUT_RESULTS$; however, you can change the variable to fit your needs or your naming scheme. |
6. | Click the Preview button. You should see two radio buttons. |
7. | Before continuing, make sure that you've placed the Get End-User Input panel in the post-install tree prior to the Execute Target File action. |
Now, to control the Execute Target File action we added earlier, we'll add a rule to that action. We want the action to occur only if the end-user has selected the Yes option. Because that information is stored in the variable we selected in the Get User Input—Simple panel, we'll use a Compare InstallAnywhere Variables rule.
3.20.224.107