-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MSI upgrades leave files behind #57
Comments
I will take any assistance in fixing the installation code. Feel free to provide pull requests |
Certainly. I will try to get my head wrapped around the build procedure. That will probably take until the weekend. |
thanks! |
Closed
Fixed by #66. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I just noticed that a previous upgrade of psqlODBC left some files behind in the installation directory, specifically the OpenSSL 1.1 libraries (libssl-1_1 and libcrypto-1_1). The reason is that the MSI packages violate the holy writ of Windows Installer, also known as the "component rules". The gist of those is that whenever the contents of a component (
<Component>
in WiX) change, the component's GUID must also change.See, e.g., https://learn.microsoft.com/en-us/visualstudio/extensibility/internals/windows-installer-basics and https://robmensching.com/blog/posts/2003/10/18/component-rules-101/.
Because the component codes are hardcoded and have not changed in a long time, and because the packages are authored so
RemoveExistingProducts
happens afterInstallFinalize
, that action never does anything. The set of components installed on the system does not change across the installation as far as Windows Installer is concerned, soRemoveExistingProducts
does nothing. Any preexisting files that are not in the new version of the package are left behind.There are two possible fixes, listed here in order of preference:
RemoveExistingProducts
afterInstallInitialize
. This will remove the old files before installing the new ones. See https://wixtoolset.org/docs/v3/xsd/wix/majorupgrade/ for more information on scheduling this action.The text was updated successfully, but these errors were encountered: