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?
Uninstall Program as Prerequisite of Another
-
- Posts: 124
- Joined: Mon Oct 22, 2012 2:14 pm
-
- Site Admin
- Posts: 5361
- Joined: Sun Aug 22, 2010 4:28 am
Re: Uninstall Program as Prerequisite of Another
It may happen that an orphan entry remains listed in Add/Remove Programs. Btw, if you try to uninstall it from Add/Remove Programs, the process will report that what you are going to remove, it's just an orphan entry.
This is how I handle it from script:
This is how I handle it from script:
Francesco Toscano
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
-
- Posts: 124
- Joined: Mon Oct 22, 2012 2:14 pm
Re: Uninstall Program as Prerequisite of Another
I didn't have an entry under
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall matching the DisplayName, only the PRODUCTCODE GUID, then realised that as I'm in 64-bit mode, I needed to look into the 32-bit hive under Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall to remove the entry.
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall matching the DisplayName, only the PRODUCTCODE GUID, then realised that as I'm in 64-bit mode, I needed to look into the 32-bit hive under Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall to remove the entry.
-
- Site Admin
- Posts: 5361
- Joined: Sun Aug 22, 2010 4:28 am
Re: Uninstall Program as Prerequisite of Another
By default, the installer runs in 32 bit mode. Consequently, the install entry will be stored into the 32-bit hive of the Registry.
Francesco Toscano
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Who is online
Users browsing this forum: No registered users and 125 guests