Changing the Default Install Location of an MSI

A few months ago, I had to tweak an MSI installer.  It was installing into a specific directory (named the same as the application) underneath Program Files.  Since the location of Program Files can change from machine to machine, the MSI has a special token you can use for Program Files (as well as for the application name).  So the current value for “DefaultLocation” of the Application Folder was:

[ProgramFilesFolder]\[ProductName]

During installation, these tokens would be replaced by the actual location based on the current machine.

I needed to change this to a specific folder underneath the users My Documents directory.  I poked around the help file and I could not find where these special tokens (like “[ProgramFilesFolder]”) were defined.  Obviously, there must be some specific set of values that are available and I’m sure My Documents is one of them.

I finally found them documented so I’m posting the link here.  Hopefully, it will help someone else out.  Not sure where I found this link…

System Folder Properties

For me, it was as easy as changing the DefaultLocation to:

[PersonalFolder]\MyToolName\Application

Technorati Tags: ,

UPDATE: Finding the DefaultLocation property.

Published Wednesday, February 23, 2011 9:25 PM by PSteele
Filed under:

Comments

# re: Changing the Default Install Location of an MSI

Hello, I'm searching for this same solution. Your link and suggestion, however, is a bit puzzling. I didn't find DefaultLocation in that link that you sent and it is unclear what you are changing. Please provide more information on what you did if possible. Thank you.

Monday, April 04, 2011 12:58 PM by Joe Marcelino