WPS: How to convert a Package to relative Source paths

When you capture an application with the defaults, the resulting WSI needs to have the source files installed on the clean PC for WPS to build the MSI file. This is an annoying limitation when you need to do a quick change to the package and the application is not already installed on the Clean PC, worse when the CleanPC is not available at all. (NOTE: In WPS 4.x and up, you can create a package with relative source paths during SetupCapture.)


In the Tools menu of WPS, in Convert Source Paths, there is a Change all paths to relative button but it doesn't work with [Path Variables] (which is used by defaults in WPS captured packages). (Wise has confirmed that this is a bug!)


Workaround

Step 1- Extract the source files from the MSI

-Start the Windows Installer Editor

-Browse to the MSI file of the Application, open

-Click Yes

-For the New Source Directory, make it a sub-directory (lets call it Files) where the MSI and WSI files are.

(ie.: if the MSI and WSI files are in W:\WiseSharePoint\Projects\MyApp, Make the New Source Directory W:\WiseShare Point\Projects\MyApp\files )

-This will create another WSI file in the Files folder. Delete it to prevent confusion.


Step2 - Modify source paths the original WSI

-Open the WSI into Windows Installer Editor

-In the Tools menu, select Convert Source Paths

-Select a path (a high-level path if possible)

-click the Change Selected Path... button

-Edit the paths to start with .\files\

-Replace [ProgramFiles] with .\files\Program Files\

-Replace [WindowsFolder] with .\files\WINDOWS\

-Replace [SystemFolder] with .\files\WINDOWS\System32\

-And so on

-Select Relative Paths from the Path Type drop-down list.

(*This MAY convert all directories you add subsequently to relative paths.)

-Click OK

-Save the updated WSI file.


Frame29