Replace New Executable With Old Executable
Posted: Tue Jan 19, 2010 12:43 pm
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.
* 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.