WPS: How to create a MSI package from a setup.exe using Projects

This is the preferred method because it types in fields automatically for you. This feature alone is useful since having to run SetupCapture more than once is not uncommon. The WSI file it creates has relative file paths so that you don’t need to install the package just to do small change. This process also update the “Workbench Database”, this makes it possible for others people can also check to see how one package or another is progressing.


Document each step used to create the package.

The purpose to document is to facilitate the recreation the package in case of an error (major or minor), to facilitate the packaging of future versions of the same package and helps to build other packages in case a special fix or tweak was used to get this package to work. If you can, use the documentation from a previous application that you packaged as a base and modify accordingly (or use the one from my tutorial). What follows is in fact a generalized version of one of those documents. Please note however that every package is different.

I prefer to create these documents using WordPad since it is already installed in Windows and does not use tones of files. I use a filename that matches with the WSI filename. (MyApplication-v123.WSI => MyApplication-v123.wri) Using the WRI extension ensures that WordPad will always be used to edit the document even when MS-Word is installed.


If you notice a step that is always done on all packages, the MSI template should then be upgraded with those changes so that they are never forgotten and not explicitly documented in all package documents.


If you must skimp on documentation, at least document anything unusual that you may have done in a package.


Create an entry for the Project

The first thing you must do is setup the project. You can use the Packaging server or the Snapshot PC to do this.

-Launch Wise Package Studio

-Edit menu => Project (Or click the Project setup icon on the toolbar)

-From the toolbar, click on the add icon

-Enter the name of the MSI file that you want to get minus the MSI extension.

-What follows is an example for Sun_JVM_v1_4_2_03



Notice that Sun_JVM_v1_4_2_03 is used only in Project name, application Name, Package name and the filename. For the Vendor Package click the … button and browse to the original setup.exe that you want to repackage. I created a folder below the Sun_JVM_v1_4_2_03 folder and called it Original Files. That way I know exactly what I used to create the package. The process of setting up a project would usually create the Sun_JVM_v1_4_2_03 project folder.

-Click Close


Capturing the Setup Process

-Restore the Clean Image on the Snapshot PC (It should already have the Wise Package Studio or its Client installed with drive mapping to the Wise Share Point). For a more step by step approach, see the tutorial.



On the Snapshot PC

-Logon as Local Administrator

-Launch Wise Package Studio

-In the Workbench, click Projects tab

-Select the active Project.

-Click on Run beside Create Package to launch SetupCapture

-Click Ok; click Next

-Capture Methodology: leave it at Snapshot but uncheck SmartMonitor. Click Next

-Begin installation capture; Click Next to take initial snapshot of system

-Click Execute to launch the setup.exe (required for SmartMonitor to work if you do use it)

-Follow the menus for the setup.exe.

-Make all changes required to make the program work.

-Document anything that is not default

-If possible do not run the application since some self-configure on first run

-Come back to SetupCapture window when done

-Click Next

-Click Next to take second snapshot of system

-Review SetupCapture Inclusions; change if necessary and click Next

-To exclude a file select the file and click Exclude

Frame11

-Click Next

-Review SetupCapture Exclusions; if necessary and click Next

-To include a file select the file and click Include

-At the finish window

-Fix the Name of the application to include the version (ie AppName to AppName 3.0)

Frame12

-Make sure the Default Folder is correct.

(It’s usually the main folder for that application located under Program Files)

-Click Finish


-If you get the Files in Merge Modules window similar to this:

Frame13

-Click Ok

-If required, download any missing Merge Modules.

-If the download fails you can try again but do it while you are still here in SetupCapture.

-Save the WSI

At this point WPS will now copy all the files that make up the package to the Wise Source Point and make all references to then in the WSI file relative. This way you will not have to install the application just to make a simple change.


Editing the package

-Click Projects tab

-Click on Run beside Edit Package

In the Installation Expert view:

In Product Definition section select Add/Remove Programs

-Click Browse to add the icon for the application

Frame14


In Feature Details section select Files

-Remove or add files that were missed during the SetupCapture process

Save WSI package


Go to the Setup Editor view:

-Click the Tables tab

-Go to Property table

-In right panel, right-click New -> New Row

-Click OK to acknowledge the warning

-In the property column enter: ROOTDRIVE

Frame15

-In the Value column enter: C:\


Frame16

-In right panel, right-click New -> New Row

-Click OK to acknowledge the warning

-In the property column enter: ALLUSERS (In UPPERCASE, no trailing spaces)

-In the Value column enter: 1

Frame17


Save WSI package

-Click Compile to create new MSI package