Changing the Default Install Location of an MSI

Posted by PSteele on ASP.net Weblogs See other posts from ASP.net Weblogs or by PSteele
Published on Thu, 24 Feb 2011 02:25:13 GMT Indexed on 2011/02/24 7:25 UTC
Read the original article Hit count: 219

Filed under:

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: ,

© ASP.net Weblogs or respective owner

Related posts about .NET