Question

I can be missing something very simple but for some reason on reinstall my basic MSI installer (Installshield 2009) is not writing deleted files from the installed directory, it write the entire component files if I delete the key file of that component but I delete non key files are not written on reinstall. I tried setting uninstall custom action before install but that didnt work, I am currently using delete all files custom action triggering after browse dialog location is set which look ugly.

I am sure there is a simple way of achieving what I want.

Was it helpful?

Solution

On "reinstall" or "repair", I would not expect any files to be deleted. The purpose is to bring back the installation to the original status.

With components and a repair: if you have multiple files in a component, unless the keyfile is deleted, a repair will not restore the other files. Best practice is to have one file per component, and have that file be the key path for that component.

I would avoid any sort of "delete all files" custom action as well. If you have files you want to remove on uninstall, look into using the RemoveFile table.

edited to add: if you have files that are not installed by the installer, but instead some how artifacts of the program itself. There is no need to use the RemoveFile table or custom actions to delete files installed by the MSI itself.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top