In our next major release, we'd like to switch from using InstallScript to Basic MSI in our InstallShield project (created from scratch). Can RemoveExistingProducts be used to call the un-install action of the InstallScript-based install before installing the MSI content? If not, what advice is there on cleaning up after an InstallScript-installed product before switching to MSI? Can it be done as part of the MSI installation?
1 Answers
No it can't. The kind of thing people do is to get the Uninstall string from the Programs&Features entry for the installed program and call it, maybe parsing the string and adding a quiet option if required. That requires running some code. The issues you get are that the uninstall may require elevation, and the UI sequence of an MSI install isn't elevated, so a custom action in the UI sequence may not work. A deferred custom action in the execute sequence will be elevated, so that may work. You'd need to deal with a possible failure of the uninstall and fail your MSI install.
Many of the installs I've seen just use a launch condition that detects the older non-MSI product and prevents install until the older product is uninstalled manually.