When an old revision of a product is being installed where a newer revision is already installed, I have found the following to be true:
* Executable (EXE) files are not replaced (with older version).
* Other files are replaced.
I have worked around this by deleting the EXE files prior to Apply Install using Call DLL (DeleteFileA). I attempted several more obvious solutions (e.g., Install Files Copy Option, Delete Files On Installation, Uninstall prior to Install) but none worked.
I don't think this is an uncommon scenario (downgrade). I also don't think it is a hard problem. So I am posting here because I suspect my workaround is non-optimal. What is the optimal way to do this?
I imagine uninstall-before-install makes the most sense - and if that is the recommended solution, I am unsure how to construct the script so that the uninstall occurs properly prior to install.
Thanks in advance for any thoughts.
Replace New Executable With Old Executable
-
MichaelNesmith
- Posts: 3452
- Joined: Thu Dec 22, 2005 7:17 pm
- Contact:
Actually, all default InstallAware scripts have auto-uninstall before installing the current version (be it old or new versions) by default. If you removed this behavior from your script, you may want to compare with a default script.
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
Transform Installs Too?
I compared my script to the default generated and Process (Un)Installation region looks the same. Namely REMOVE controls whether Apply Uninstall gets hit. So, if I read between the lines - REMOVE will be true as long as a new revision code is used. Is this correct?
The behavior I am seeing is that the old EXEs are still in TARGETDIR. I assume Uninstall is not occurring, but I have not verified that.
Now, does Transform Install change the picture? I am making use of that in my script.
Thanks again for your thoughts.
The behavior I am seeing is that the old EXEs are still in TARGETDIR. I assume Uninstall is not occurring, but I have not verified that.
Now, does Transform Install change the picture? I am making use of that in my script.
Thanks again for your thoughts.

