Design Considerations
This document will demonstrate, how to seamlessly install Engine Runtime and your application using 'Wise for Windows Installer'*. A trial version of Wise is available for download at http://www.wise.com/Products/Installations.aspx
*Note: The screen shots and directions in this document were based upon the original 'Wise for Windows Installer' application. A newer version of the application is available by Symantec called 'Wise Installation Express' and the screen shots and directions may be different for this newer version.
Before you start to author a set up program, you should gather some information about it:
-
What is the product trying to deploy?
-
What is the version number?
-
What is the name of the application?
-
Is it a .NET application?
-
Will it have one or many features to install?
-
Does the system have everything you need on the machine?
-
Is Engine Runtime or Desktop on the machine
-
Is the Engine .NET feature installed?
-
Is Microsoft .NET Framework installed?
-
Is a message needed to tell the user that all the prerequisites have not been met and that the install will stop? (ie Engine Runtime is not installed)
-
Launch conditions, (how is the application going to be deployed?)
-
Will you install the prerequisites for them?
-
Will it be installed silently?
-
Will the user need to use the user interface?
Once all the relevant information has been gathered, it is suggested to perform the following steps: Create a Template, Create Launch Conditions, Add Install Prerequisites, Add Files, Add Shortcuts, Add Custom Actions and Compile, Test and Deploy the Solution.
Step 1: Create a Template
A template will need to be created to provide valuable information to end users, such as, the Product Name, Manufacturer and Application Type.
-
From the start menu, open up Wise Package Studio. A workbench will display, choose Windows Installer Editor and click Run.
-
Create a new Windows Application
-
On the Installation Expert tab, in the PageViews: drop down select the type of Installation you would like to create (In this example, create a Windows Application.)
-
Expand the Project Definition section. Under the Product Details, fill in the relevant information such as the Product Name, Manufacturer, Default Directory and Application Type. The Default Directory value can be changed by clicking in the value column and clicking on the Change button to fill in the relevant information. Your default directory should be a new folder under Program Files.
-
Add additional information to the General Information and Add/Remove Programs pages. Additional features can be added to the Features page. Information provided will be stored as properties in a database and updated on the Project Summary page. This information is useful at install time or at runtime.
-
The information provided can be used to populate registry keys. On the Installation Expert tab, expand the Feature Details section. Click on the registry page, select the HKEY_LOCAL_MACHINE hive on the destination computer. Add new keys for the product such as location, product name, product version, and optional features to the software [ProductName] hive.
Step 2: Launch Conditions
Once a template is created, the launch conditions need to be checked. Some properties (a.k.a. variables) will need to be created.
-
In the Setup Editor tab, under the Product tab, click on Properties in the Table of Contents.
-
Create new properties that will hold the value of the conditions you are checking for. In the right pane, right click New > Property.
-
Give your property a name (ie DOTNET20, ENGINERUNTIME) and set the value = null.
-
Search the target system to see if the registry key is present and installed on the machine. Go to the Installation Expert tab, expand the Target System section, click on System Search to perform a registry search. Click Add > Registry and set the property added in step iii) to that value.
-
Set your system requirements through the Installation Expert tab, under the Target System section click on the System Requirements page. If .NET is a requirement, change the minimum value to the version which is needed (ie Version 2.0.50727) by double clicking on the Requirement and enter error message that should appear if the condition is not met. This change will be reflected under the Setup Editor tab, Product tab, when you click on the launch condition.
-
For requirements not already listed on the System requirements page, such as Engine Runtime, go to the Setup Editor tab, Product tab, and click on Launch Conditions in table of contents. Right click, new launch condition. At the Condition box, click the Build… button. Under the Fields, select the Property object. Under Values double click ENGINERUNTIME click the = button. Type in “9.2”. This will check to see if Engine Runtime 9.2 is on the machine.
-
Click on the Check Syntax button to verify that the Condition statement is valid. Click OK.
-
Provide message that will appear if this condition is not met.
Step 3: Install Prerequisites
Now that the template and the launch conditions are finished, a check needs to be performed to make a decision whether Engine Runtime needs to be installed with the custom application. If Engine Runtime is not on the machine the installation program will install it before installing the custom application. If Engine Runtime is already on the machine then the Engine Runtime installation will be skipped and only the custom application will be installed.
-
Under the Installation Expert tab, expand the Release Definition section and open the build options page.
-
Under EXE Options drop down box, select “.EXE that launches external .MSI”
-
Under the Installation Expert tab, expand the Release Definition section and open the Prerequisites page.
-
Add the prerquisite by clicking on the Add button, choose the Prerequisite… option. For the File Path, Browse to where the Engine Runtime setup is located (i.e. L:\setup.exe). Supporting setup files will need to be added to the copied location of the setup.exe after compilation.
Step 4: Add files to the Install
Once the first 3 steps are complete, the install files need to be added. It is highly recommended to create an image location before performing this step. This image location should be identical to what should be installed on the end user’s system.
-
Under the Installation Expert tab, Feature Details section, click on the Files page.
-
From the top half of the screen, select the folder where your image location resides and click Add Contents (or just drag and drop the folder or files to the Destination Computer).
-
Any .NET DLL’s will need to be added to the Global Assembly Cache (GAC) by dragging and dropping your dll from the top pane into the Global Assembly Cache folder in the bottom pane. The Global Assembly Cache folder only shows up if .NET Application has been selected on the Product details page.
Step 5: Add Shortcuts
Shortcuts can now be created in the start menu.
-
Under the Installation Expert tab, expand the Feature Details section and click on the Shortcuts page.
-
Click on the Add button, to add a shortcut.
-
Select the Command Line radio button. Provide the name of the exe as the Command line and give the short cut a name.
-
Click Next and add a new folder under Profiles > Start Menu > Programs. Click OK and Finish.
Step 6: Add Custom Actions
Now custom actions can be created. These are the normal actions that should happen in the solution’s sequence. For example, a custom action is needed to launch Engine Runtime’s Software Authorization Wizard.
-
There are many different ways to launch custom actions based on user needs. Under the MSI Script tab, select an appropriate action for the custom action. For example, click on Execute Program From Installed Files.
-
A form will appear. Fill out all relevant information. From the example above, under the Details tab, give the action a name, browse to the file location ( ie <install location>\arcgis\bin\SoftwareAuthorization.exe) must be given to complete the custom action.
Step 7: Compile the Application
Finally the application is ready to be compiled and deployed.
-
On the bottom right click on the compile button. This should not return any errors.
-
On the bottom right click on the Run button to test the install setup.
Step 8: Test and Deploy the Application
Test the application with and without the various prerequisites identified. Ensure that all files have been installed to the proper locations, shortcuts are added, the custom actions are launched successfully, the application(s) show up in the Add Remove Programs list and the correct keys are created in the registry. Once testing is complete, the application can be deployed to multiple end users.