View Full Version : Path to a previous installation

06-08-2006, 04:33 PM
I have a Basic MSI project as a major upgrade to a previous version of my software. For some reason, some of the folders are not deleted during the upgrade. The files from the previous version are deleted but not the folders. Do I have a setting wrong? Do I need to run a vbscript to delete these folders? And if so, how can I find out the path of the previous installation?


Kevin Endow

06-09-2006, 12:19 PM
Hmmm... If you manually uninstall the old program, are the directories deleted? You might see if creating an MSI log file tells you anything, or see if changing the location of RemoveExistingProducts helps.

If nothing else, this DevLetter tip should explain how to retrieve the installation directory of an earlier version: http://www.installshield.com/news/newsletter/0305-articles/MsiPropUninst.asp.

06-12-2006, 10:44 AM
Unfortunately only some of the directories are deleted. If a user saves a file in to the folder it is not deleted. There is no way to delete a folder with a standard action when there is files in it, correct? I think we are going to have to run a VBScript.

Thanks for the DevLetter tip, I will check that out

06-12-2006, 01:19 PM
Right, Windows Installer by default won't remove a directory if there are files in it that weren't part of the installation; in some cases, though, you can list file names (including wildcards) to remove by creating records in the RemoveFile table, which is exposed in the Direct Editor view. The MSI help library describes the RemoveFile table, and these forums should have some specific examples.

06-14-2006, 05:04 PM
Thanks, I will try that.

06-15-2006, 06:16 AM
The only problem with the RemoveFile table is there is no way to remove a whole tree of directories with just one entry. If you have many directories to potentially remove, you have alot of work ahead of you entering records for each subdir.

good luck.