Uninstall Program as Prerequisite of Another
Posted: Tue Jun 23, 2020 11:16 am
I have three setups, only one of which can be installed at a time. Each setup has it's own product code. I need to check for and remove the other program if it is installed.
At the beginning of my script, using the product codes, I determine if any of the other two are installed, and following what is done with the PREREQ & NEEDSUPGRADE sections, I call Install/Remove MSI REMOVE=ALL for the appropriate product code, and then continue on with my setup.
This removes the install, but doesn't remove it from the Add/Remove Programs list. It is still listed, but trying to remove it will prompt with an error message about not being able to find the setup file.
I can delete the registry keys easily enough, but is there a "proper" way to do this?
At the beginning of my script, using the product codes, I determine if any of the other two are installed, and following what is done with the PREREQ & NEEDSUPGRADE sections, I call Install/Remove MSI REMOVE=ALL for the appropriate product code, and then continue on with my setup.
This removes the install, but doesn't remove it from the Add/Remove Programs list. It is still listed, but trying to remove it will prompt with an error message about not being able to find the setup file.
I can delete the registry keys easily enough, but is there a "proper" way to do this?