Video Screencast Help
Symantec Secure Login will be live on Connect starting February 25. Get the details here.

Application Packaging Best Practices for Windows XP: Part 1

Created: 16 May 2007 • Updated: 09 Apr 2009
Language Translations
Scott Hardie's picture
+3 3 Votes
Login to vote

In this installment of the series, Scott explains how to make the most of the Wise Package Studio to build .MSI installer files for clean installs and for upgrades. He also explains the functionality and and available options for the SetupCapture and InstallationExpert tools.

Editor's Note: Here's a list of the other articles in this series: Introduction, Part 1, Part 2, Part 3, Part 4, Part 5.

Packaging Work Flow - Application Integration

  • Install Windows XP Professional on both the Packaging and Testing workstations.
  • Install Wise Package Studio Client on the workstation then launch the application.
  • Projects should be assigned to packagers from the Packaging Team Lead. They should be staged in the workbench prior to being assigned to packager.

Create a Package (SetupCapture)

SetupCapture is the process which monitors the changes that occur to your system as a setup installation program is run. The SetupCapture wizard takes a before install and after install snapshot of the workstation then creates a package based on the differences between the before and after snapshots. The SetupCapture Wizard will walk you through the steps necessary to begin the scanning and installation process. Since SetupCapture monitors any changes made during an installation, it's very important to start with a 'clean' machine. This will ensure that unnecessary changes are not captured in the .MSI package.

To run SetupCapture, do the following:

  • Run Wise Package Studio Client 7 SP2 on the Packaging workstation.
  • Logon using an account supplied by the Packing Team Lead
  • Click the Projects tab in the Left Pane of the Workbench
  • Select an Active Project assignment.

Double-Click the SetCapture icon to launch the wizard.

Click to view.

Select the SetupCapture option.

Click to view.

Browse to the Target Installation option and create a WSI file in application to be captured directory.

Click to view.

Click Next. * All exclusions should be set from the server template.

Click to view.

Choose Snapshot and check "Use SmartMonitor in conjunction with Snapshot". Click Next.

Click to view.

Click Next to start the Before Snapshot.

Click to view.

Click Execute to run the application's original Setup.exe install. You can run multiple installs or configuration files (registry merges, patches, etc.); then click Next to proceed continue.

Click to view.

Verify that you ready to end this capture. Click Next.

Click to view.

Allow the scanning process to complete.

Click to view.

View the Inclusion drop-down list and review the Files, Registry, and INI Files to verify that the items listed are needed to complete the install. If they are not needed select the item then click Exclude. Click Next to continue.

Click to view.

The next screen allows you to review items excluded and include them if you choose. If the item is needed select the item then click Include. Click Next to continue.

Click to view.

Complete the Product Information

  • Enter the application product information for the installation package. This information will be displayed in the Add/Remove Programs applet. The Application Name, Version and Manufacturer should be filled in.
    Note: Only numeric values should be used in the version field. If an application version contains an alphabet, a number in lieu of the alphabet can reference this character. For example, the version field for Adobe Acrobat Reader 6.0c would appear as 6.0.3. The version field for SAP 3.1.H would appear as 3.1.8.
  • In the Default Directory field, verify the application directory is selected. Use the Change button to modify the Default Directory if necessary.
    The option 'Don't update or recompress files when saving (MSI/MSM only) is only available with working in the .MSI or .MSM file.
    The Product Code is automatically generated when creating the .MSI. If necessary, a new product code can be generated by selecting the Generate button.

Complete the Product Information details on this form, Click Finish.

Click to view.

Company Standard Properties
In an attempt to reduce repetitive tasks, certain properties have been predefined in the Company templates. A property in Windows Installer is equivalent to a variable. Properties contain information, which is used during the installation of the application. Below is a list of the standard properties that are set.

The ALLUSERS property is set to 1
As a general rule, managed applications will be installed to a workstation and not to a user. This means users will have access to all applications installed on a given workstation. All applications will be installed using an account with elevated privileges. This will install all necessary components of an application.

The ROOTDRIVE property is set to C:\
To ensure applications are installed to the C:\ drive, the ROOTDRIVE property can be set to specify the default drive for the installation.

The APPLYTEMPLATE property is set to ChangeMe
The APPLYTEMPLATE property is a property defined by the customer and allows the packager to apply all template settings on save event if the APPLYTEMPLATE value is set to Null. If the template is updated the packager need only Null the setting and save for new template changes to be applied.

The PACKAGENAME property is set to ChangeMe
The PACKAGENAME property is a property defined by the customer. This property simply defines the application package directory name. It is used on save to create the packages name.msi.

The WRKDIRPATH property is set to Optional
The WRKDIRPATH property is a property defined by the customer. This property is used to define the working directory for an application if it differs from the directory of the application executable.

The SOURCELIST property is set to ChangeMe
The SOURCELIST property is used to add another source path to the search list of an application that differs from the install location. The customer will use this property to redirect applications to the DFS share.

The ARPNOMODIFY property is set to 1
To remove the modify button in Add/Remove programs

The ARPNOREPAIR property is set to 1
To remove the repair button in Add/Remove programs

The REINSTALLMODE property is set to omus
To ensure Files replaced do not exist or are an older version of the existing file. Per-User registry keys will re-install and all shortcuts.

Editing the Package (InstallationExpert)
The Installation Expert view contains a set of screens to help create and modify an application package. By default, this view is divided into eight sections: Project Definition, Feature Details, Advanced, Package Options, Target System, User Interface, Release Definition, and Distribution.

We will only highlight the parts that XCEND packagers use to complete a MSI.

Installation Expert View

If Workbench is open skip the next section

To run Wise for Windows Editor, do the following:

  • Run Wise Package Studio Client 7 on the Packaging workstation.
  • Logon using an account supplied by the Packing Team Lead
  • Click the Projects tab in the Left Pane of the Workbench
  • Select an Active Project assignment

Click to view.

Project Summary

This is a new feature for Wise that gives the packager a general overview of the project.

Product Details
The packager can modify Values for columns that are not grayed here. If the packager needs to modify more than is available on this page, use the tables to make those modifications. The Company required fields have a value of ChangeMe.

General Information
The Title, Subject and The Author fields are modified on this page. Use the company standard naming convention.

Add/Remove Programs
Select the 'Hide modify button' and 'Hide repair button' if you do not want the user to be able to modify or remove the installation; the repair button is also an optional Property setting.

Merge Modules
A merge module is similar in structure to an installation package, but it cannot be installed alone. It must be merged into an installation package. Merge modules can deliver all the files, registry entries and other modules needed to install and utilize code shared amongst multiple applications. Third party vendors will eventually provide merge modules for use in installation packages.

If a merge module is not installed, click the Download to check the internet locations for the required Merge Module.

Select the Add New button to add a merge module to an application package.

Files are added to the bottom half of this page from the top half which represents the actual files on a packager's HDD. Permissions can be assigned to files and/or folders by right clicking the item and entering its property setting.

By default, the following set of standard folders will appear in the Destination Computer window:

	C:\Program Files
\Common Files
\Admin Tools
+	\Profiles
+	\All Users
\Application Data
+	\Local Settings
+	\My Documents
+	\Start Menu

The Windows Installer runtime engine detects the operating system of the destination computer prior to installing the application. The standard directories listed above will be adjusted according to the operating system on the Destination Computer.


Standard Directory in WFWI Directory Location on Windows XP
C:\Windows\Profiles\All Users
C:\Documents and Settings\{current profile}
Current User's My Documents location
C:\Documents and Settings\All Users

These standard directories will not be included in the application package if no files or folders are created within these directories during a SetupCapture. Additional folders can be added to these existing directory structures as needed.

The following files are commonly captured in an application package and can be deleted.*.tmp files:

  • *.bak files
  • *.log files
  • uninst.* files
  • unwise.* files
  • C:\Winnt\Ms\Sms\*.* files
  • C:\Program Files\Common Files\Symantec Shared\*.* files
  • C:\TEMP\*.* files
  • C:\WINNT\security\Database*.* files
  • C:\Program Files\Navnt\*.* files
  • C:\WINNT\CSC\*.* files
  • C:\WINNT\Debug\*.* files
  • C:\WINNT\Installer\*.* files
  • C:\WINNT\System32\DLLCache
  • C:\WINNT\System32\wbem\\Repository\*.* files
  • C:\WINNT\System32\Perflib_Perfdata_*.dat
  • C:\WINNT\system32\NtmsData\*.* Files
  • C:\Documents and Settings\%username%\Local Settings\Temp\*.* files

Files can be deleted from the Files page under Installation Expert or from the Components tab under Setup Editor.

Files can be placed in folders on the Destination Computer window by simply dragging the file to the appropriate folder in the Destination Computer window.

Registry Page
Verify registry settings for each Feature and make any necessary changes.

Registry changes can also be made in the Setup Editor view, on the components tab.

The following registry entries are commonly captured in an application package and can be deleted.

HKCU\Software\Policies and All Subkeys
HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer and All Subkeys
HKCU\Software\Microsoft\Internet Explorer\Toolbar\ShellBrowser and All Subkeys
HKCU\Microsoft\Windows\CurrentVersion\Internet Settings and All Subkeys
HKLM\Software\Policies and All Subkeys
HKLM\Software\Microsoft\Cryptography and All Subkeys
HKLM\Software\Microsoft\Windows NT\CurrentVersion Winlogon\GPExtensions and All Subkeys
HKLM\System\CurrentControlSet\Services\TCPIP and All Subkeys
HKLM\System\CurrentControlSet\Services\KMixer and All Subkeys

INI Files
Verify .INI files contain appropriate information for the application. Verify that all previously hard coded information has been converted to variables.

Shortcuts Page
Verify the shortcuts to be created for each Feature of the application package and make any necessary changes by selecting the Details button.

Shortcuts should only reside under the Start/Programs menu for program executables. Shortcuts for program help or text files and no icons should not be created on the Desktop.

Verify necessary services to be installed and started with the each Feature. Use the Add button to Create and Control service.

Verify or add any ODBC drivers and data sources needed for application to run. Use the Add button to create ODBC Data Sources, Drivers and Translators.

System Requirements
Define any specific system requirements needed to install application. The settings on this screen will cause warning messages to display on the target workstation if the system does not meet the minimum requirements specified.

System Search
This screen enables Windows Installer to search for specific item on the destination computer during the installation. Windows Installer can search for files, directories, INI files, registry entries and components.

On the System Search screen select the Add button to specify the items to search for on the workstation.


On the Release page, accept the default release option. The default options should be as follows: Release Name - Default; Build - Checked; Installation Theme - None ; Compression Type - Normal (MSZIP)

Build Options Current Release - Default
EXE Option - Do not create an EXE file

Make sure the Media Option is set to 'Cabs Inside.' If the Media Option is not set to 'Cabs Inside', double click on the Media Name and select 'Compress files inside .MSI' from the Media Type field.


Minor Version Upgrade
If upgrading to a minor version of the application (ie. upgrading from Adobe Acrobat Reader 4.0 to Adobe Acrobat Reader 4.0c), the product codes for the upgrade and the previous version must be the same. The product code can be copied from the application package from the previous version into the upgrade application package.

Major Version Upgrade

If upgrading to a major version of the application, (upgrading from Adobe Acrobat Reader 7.0 to Adobe Acrobat Reader 8.0), a new product code must be used for the application upgrade. A new product code will be generated when creating the upgrade application package.

If the upgrade application requires the previous version to be uninstalled, this can be accomplished using Altiris Software Delivery Solution to uninstall the previous version of the application using the product code.

Upgrade will remove the previous version of the product at the ending of the installation. This means that files common to both versions will be removed. In theory the self-healing features of MSI's should reinstall these files. However another option is to change the sequence in which the actions occur by going into the setup editor - actions section and changing the Sequence Number of the RemoveExistingProducts action to 1450. This places the uninstall of the previous version at the start of the installation allowing for a much cleaner installation.

To add an upgrade to a .MSI package, do the following:

  • From the Installation Expert View, select Upgrades page.
  • On the Upgrades page, click on the ADD button, then browse and select the .MSI package in which to create an upgrade.
Note: The .MSI selected will be for the previous installation that is to be upgraded.

After selecting the file the window shown here will appear.

  • In the Maximum Version field, enter the version for the upgrade application.
  • Click OK when done.

The Compile feature adds the source files associated with the installation package and creates the actual .MSI package. The application package and all associated files should reside in a single directory.

  • Select the Compile button to create the .MSI file. The Compile button is located on the bottom right side of screen.

Wise for Windows Installer will then compile the application package and place the .MSI package in the same directory as the .WSI file.

  • Select Cancel if prompted with the Distribute Wizard.

The Test mode launches a mock-install that displays all of the screens and dialogs in your installation but it does not make any changes to the workstation.

Verify installation appears with no error message or user intervention. This can be done by clicking the Test button located at the bottom of the window on the navigation bar.

The Run mode will actually run through a complete installation modifying the specified files, system files and registry entries called for from the Windows Installer package. This feature will run the installation only on the Packaging workstation. To thoroughly test the application package, run the application package on the Testing workstation using an account with standard user privileges. For additional information refer to Appendix A: Application Testing Checklist.

  • Complete the APPNAME.TXT file, and save in the application package directory. The filename should be the same as the application package name (ie. APPNAME.TXT). The APPNAME.TXT file contains basic information about the application package which can be used by the Altiris or System Administrator when distributing the managed application. Refer to Appendix C to review a sample APPNAME.TXT file.
  • Once the application package has been completed, the application package directory can be copied to a staging area (Certifier Inbox) for application certification.
    • Example: ..\Certifier Inbox\APPNAMEVV_XX\APPNAMEVV_XY.MSI
    • ..\Certifier Inbox\APPNAMEVV_XX\APPNAMEVV_XX.WSI
    • ..\Certifier Inbox\APPNAMEVV_XX\APPNAMEVV_XX.ALT
    • ..\Certifier Inbox\APPNAMEVV_XX\APPNAMEVV_XX.TXT

Any additional scripts or files needed to install application.

Application Packaging Best Practices for Windows XP: Introduction

Application Packaging Best Practices for Windows XP: Part 2