Why are MSI Packaging Standards (Best Practices) Important

In general, all components function independently and together as a whole. Similarly, MSI Packaging namely the installation or uninstallation of the software, have to work independently and together as part of Operation System specifically registry and system file. As a result of this working together helps with defining standards so that when there are changes to either one of the system (MSI Packaging or Operating System) we clearly know what these changes are and how they impact each other. Here are some of the MSI Packaging Best Practices defined for your review:

Here are some of the MSI Packaging Best Practices defined for your review:

 

General
What are Packaging Standards?
Why do we need them?
What are the benefits?


MSI
What is MSI?
What is Windows Installer?



Operating System (OS) Build
Why do I need Base OS Build?
Which Operating System to use?


Packaging Standards
ShortCut
Advertised/UnAdvertised ShortCut
Heel vs Repair Process
What is Key Path?
Where to find Uninstall information?
User file copy


1. Provide Technical Requirements
Provide Instructions to Package
Provide Software to Package


2. Confirm Requirements
Received Instructions?
Received Software?
Review Instructions
Review Software


3. Create Package
Authoring a Package
Creating a Transform
Re-Packaging a Legacy Application


4. Testing
Install with Administrator Privilege


5. Create Documentation
Key Items in Packaging Document


6. Peer Review
Things to Check for
Provide Software to Package


7. Release for UAT Testing
Provide Instructions to Package


8. Receive Production Approval
Productin Approval


9. Release to Production
Production Availibility


===========================================================================================================

What are Packaging Standards?

When you deploy an application to a desktop or a server where an Administrator or User is experiencing your work effort, it must be in pristine condition. This includes error prone, no pop ups, no questions to answer, no errors period. Having a set of guidelines and rules to follow to develop pristine work are very helpful. Hence the need for having Packaging Standards for the windows space. These set of rules can be either mandatory and nice to have.


Top

Why do we need them?

We need packaging standards to have consistency in the ability to deploy application on a desktop or server without errors and to improve quality of the package released.


Top

What are the benefits?

Benefits of packaging standards is uniformity and consistency in creating a package. They are suppose to help develop packages in a standard manner.


Top

What is MSI?

MSI is a microsoft windows file type that has the extension .msi similar to .doc or .jpg for Word or Pic file. MSI file is a database of:

1) Files
2) Settings (ODBC)
3) Configuration (ini)
4) Registry (HKCU/HKLM)
5) ...

information for the associated application that you are trying to install on a desktop or server.


Top

What is Windows Installer?

Windows Installer is a exe named msiexec.exe available on your windows systems. It is this service that provides the installation/uninstallation of an application. Each windows Operating System (OS), is bundled with Windows Installer service with a minimum version associated with each OS. This link provides the mininum version on each operating systems.


Top

Why do I need Base OS Build?

Base OS Build allows you to capture all the files and registry that may or may not be present on a 'dirty' PC. This PC has the plain OS, Virus Scan and a very core set of application that is a must within your organization. This core set of application is not a list of all applications that is installed on every desktop or server. At times Base OS Build is only the base OS without even Virus Scan in a case where you are creating a package for Virus Scan. You certainly don't want to test with Virus Scan already installed. If you test it with Virus Scan already present, you are testing an upgrade scenario not a first time install.


Top

Which Operating System Build to Use?

For snapshot, authoring or transform creation use the least common demoninator approach. If XP SP3 is the older OS within your organization, XP SP3 should be used. Your initial testing should be done on this platform as well. Once testing is successful, then perform additional testing on newer platforms namely Vista and Win 7.


Top

ShortCut

Another name for ShortCut is icon. The one you see under Start/Programs, the one you click on to launch an application. There are two types of shortcut - 1) Advertised 2) Un-Advertised. The recommendation is to always create Advertised shortcut where possible. I will explain the different in separate section.

Not every application will have a shortcut. An exception would be certain types of plugins.

This topic is about the ones that have shortcut. A normal standard would be not to create or remove desktop shortcut and always place them under Start/Programs. This will help keep a clean desktop space for the users. It will create a well organized desktop space for the user. Hence it is not recommended to have desktop shortcut.

My recommendation is that shortcut is not a mandatory standards. Hence if a user insists on having a desktop shortcut, create one.


Top

Advertised/Unadvertised ShortCut

All shortcut must be advertised. Why ? Windows Installer has a built in capability to repair itself should it find some of the components (based on Key Path) are uninstalled or not available. Hence, when a users clicks on the advertised shortcut, it can trigger the repair functionality and fix the problem to launch the application successfully. (Everyone has seen this window come up on lot of the windows application where it looks like the application is going through the installation process.) If the shortcut is un-advertised it lacks this functionality and it can leave the application in a corrupt state requiring to be uninstalled, followed by successful installation.


Top

Heel vs Repair Process

Heel is the capability for Windows Installer to identify if the key componets that are identified by Key Path are missing within the MSI. If during the installation or launching of the advertised shortcut, the msi installer identifies that the key path is missing, it will trigger the windows installer into a repair mode or installation (corrective) mode.


Top

What is Key Path?

Key Path is a specific file, registry key or ODBC data source that the MSI specifies as critical for a given component. No two component should use the same key path. When the user launches the advertised shortcut, it is this key path that are checked first to identify if anything is missing/mis-matched. If missing/mis-matched, then trigger repair functionality and then launch the application.


Top

Where is the Uninstall information?

Uninstall string for an application can be found at HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall. Remember on x64 system the uninstring for x32-bit application can be found at HKLM\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall not at the above location.


Top

User file copy

When you want to copy a user file the best approach is to use active setup to copy the file. This will ensure that every new user that logs on the machine will receive that file. The assumption here is that this is a file that requires modification by the user.


Top

Provide Instructions to Package

For packaging an application, instructions are very important and a must. Instructions provide the detailed information required to package the application. Whether the application is being packaged for the first time or updates/modifications are required, clear instructions must be provided. Do leave to assume certain instructions if you are submitting instructions for updates/modification. Therefore, a clear step by step install instructions are key to packaging an application. The best way to capture these instructions are by making sure you as a requestor have performed the actions. Some of the key items to include in the instructions are:

1) OS the application is supported on
2) Sequential Screen Shots
3) Dependency (if any)
4) Post Installation Instructions
5) Functionality Testing Instructions
6) How to identify if the fix is working


Top

Provide Software to Package

For packaging an application, software is also important. Although, software is a not a must. If packaging an application for the first time, software is required but if the updates/modifications are required, instructions may suffice.


Top

Received Instructions?

The first step is to check if instructions have been received for the application that is to be packaged.


Top

Received Software?

Next step is to check if software is received. If not review the instructions to see if you need software. As mentioned before, instructions are a must but not software. Without reviewing the instructions you cannot automatically reject the request to package as you may not need the software again.


Top

Review Instructions

Now review the instructions that are provided. If no software is required, review each step of instructions to ensure you will be able to follow all the steps. Sometime, these steps may require to write scripts to automate some steps. By reviewing the instructions you should be able to assess if you will be able to perform this operation. Once you fully assess the work effort required you will have a full understanding of what is expected to be done.


Top

Review Software

If software is provided, install the software as per the instructions provided ensuring you are following exactly the steps mentioned in the instructions. If there is any discrepancies, it should be documented and remediated with the requestor. If there are post install steps, perform those steps. If there are dependency to be installed, install them prior to installing the software. Ensure you perform this task on all the platforms the software is supported. There are number of times, it is identified after the package has been created that it does not work on one platform and it is very time consuming to troubleshoot.


Top

Install with Administrator Privilege

Revert or get a clean OS image. This will ensure you are starting on a clean environment. Now, install the package with an account that has adminitrator privilege. If there are dependency to your application, install those prior to installing your application.


Top