Page 1 of 2
Add/Remove Program Entry
Posted: Wed Nov 21, 2007 12:20 am
by GLSchrader
When I run an upgrade to an installation program, I leave the product code the same and change the revision code so that the upgrade version will uninstall the previous version and install the newer version.
Everything works fine, except the previous version entry remains in the Add/Remove Programs list in control panel. Sometimes when I try to remove it manually, I get the message that it cannot find the resource, which means the uninstall worked and the installation package no longer exists. Other times, it just give me the option of removing it from the list.
If I uninstall it manually prior to running the new version installation program, the entry is removed from the list.
Is there something I need to check in the script to make sure that the entry is removed on uninstallation when upgrading?
Posted: Wed Nov 21, 2007 5:41 pm
by Alex_Ronquillo
What you can do is include the following code line right after the previous version uninstallation:
Code: Select all
Delete Registry KEY HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\$PRODUCTCODE$\\*.*
Basically, the code will end up being:
Code: Select all
Install/Remove MSI Package $PRODUCTCODE$[REMOVE=ALL] (get result into variable REMOVEOLD)
Delete Registry KEY HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\$PRODUCTCODE$\\*.*
Add/Remove Program Entry
Posted: Wed Nov 21, 2007 9:01 pm
by GLSchrader
Thank you for your quick reply.
I tried your suggestion and my problem still exists. The line you suggested removes the registry entry with the product code, but when the installation is run, it creates that entry and an entry with the application's name. For instance, if I install "My App 1.0", a registry entry with that name is added during the installation. When I then upgrade to "My App 1.1", the registry entry with the product code is removed, but the "My App 1.0" entry remains.
I tried modifying your suggested line by changing $PRODUCTCODE$ TO My App 1.0, but that did not work. I tried different variations in to try to get it to work. I tried My App *, "My App 1.0", etc., but nothing worked to remove that entry.
I suspect this has something to do with the application titles being different, but I don't know why that should matter when the uninstall is working off of the product code. I would think that all entries that were created with that product code would be removed during the uninstall, but that is obviously not the case.
Add/Remove Program Entry
Posted: Wed Nov 21, 2007 9:52 pm
by GLSchrader
Please disregard my last post. I rechecked my code and found that I had made a typo in the line. I didn't catch it because I copied the line with the $PRODUCTCODE$ and modified it. Of course, the uninstall removed the registry entry with the product code prior to executing the Delete Registry lines. So I thought part of it worked, but the part to remove the application name didn't.
It now works as you advised. What I did was create a variable called OLDAPP. I then read the display name from the Product Code registry entry into OLDAPP. I executed the uninstall line and added your suggested code following the uninstall, but changed $PRODUCTCODE$ TO $OLDAPP$.
It worked perfectly with any version that I am updating.
I still do not understand why it does not remove the registry key with the app title when it deletes the rest of the previous installation. The only information in that registry key is the information supplied to the Add/Remove Programs view in the design view. Any ideas on that one?
Thanks
Posted: Thu Nov 22, 2007 2:13 pm
by Alex_Ronquillo
It is a limitation of the "Install/Remove MSI Package" command, it doesn't remove that registry key for the add/remove programs.
Posted: Thu Mar 12, 2009 6:34 pm
I am having the same problem.
It seems that there is a registry branch like
HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\$PRODUCTCODE$\\*.*
created, but also a
HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\PRODUCT_NAME_1
branch as well.
If the product name changes from PRODUCT_NAME_1 to PRODUCT_NAME_1.1, then there are 2 entries left in the ARP. Even when I remove the $PRODUCTCODE$ registry key, there is still a key left that has the name.
Am I missing something?
Thanks,
Jay
Posted: Wed Nov 04, 2009 6:46 am
by alibaba
remove also the key
HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\PRODUCT_NAME_1
as GLSchrader described above:
Code: Select all
Read Registry Key HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\$PRODUCTCODE$\\DisplayName into OLDAPPTITLE
Install/Remove MSI Package $PRODUCTCODE$[REMOVE=ALL] (get result into variable REMOVEOLD)
Delete Registry KEY HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\$OLDAPPTITLE$\\*.*
I had the same problem but now it workes as desired.
Thx to GLSchrader!
Re: Add/Remove Program Entry
Posted: Mon Apr 09, 2012 2:10 pm
by kssummer
I have an application with two different $PRODUCTCODE$ variables, but with the same Application name. In the windows "Add/Remove Programs" list, only the most recently installed application appears.
Is this expected behavior? As far as I know, the only similarity between these two installaware projects is the product code.
I'm using InstallAware 9 R2.
Re: Add/Remove Program Entry
Posted: Tue Apr 10, 2012 7:30 am
by FrancescoT
Dear User,
Obviously this happens ... it is an expected behavior if you use the same PRODUCTCODE for two different setup.
Doing this the system it is not able to recognize those as two different packages.
Why are you doing this?
Regards
Re: Add/Remove Program Entry
Posted: Tue Apr 10, 2012 10:26 am
by kssummer
Oops. I mis-typed. The product codes are different...the application names are the name.
...but only one application shows up in Add/Remove Programs
Re: Add/Remove Program Entry
Posted: Tue Apr 10, 2012 10:44 am
by FrancescoT
Dear User,
unfortunately I suppose that happens also with the same app name.
Honestly I never tried it!
Please excuse me for the stupid question, but why do you need to have two different application with a same name?
If you try to remove the app via ARP, which one it is really removed, the first installed or the next one?
Regards
Re: Add/Remove Program Entry
Posted: Tue Apr 10, 2012 11:26 am
by kssummer
One application is a new/improved version of the other. We need to support both applications on one machine though...so I changed the PRODUCTCODE and the installation directory of the new version. At install-time, the user can uninstall old versions or keep it around.
We work in an industry where having both may be beneficial to troubleshoot system problems.
The last version installed will be the one removed by Add Remove Programs.
I didn't want to change the name of the Application though. It that the only way to resolve this problem? I've seen other applications (from microsoft) with the same name within the ARP list...but I doubt they were installed with InstallAware.
Re: Add/Remove Program Entry
Posted: Wed Apr 11, 2012 9:15 am
by FrancescoT
Dear User,
I have personally executed a test.
The logic used by ARP itself, it is the only responsable of the way used to display installed application.
ARP uses The application name as key value ... I do not think that depends by InstallAware at all.
Why do you not add a character to the application name, to distinguish these apps?
Unfortunately I can not tell you more.
Regards
Re: Add/Remove Program Entry
Posted: Wed Apr 11, 2012 10:49 am
by kssummer

- Dual keys in Add/Remote Programs
- ARP_keys.png (87.15 KiB) Viewed 30612 times
I've attached an image that argues otherwise. My Add/Remove Programs list has two of the same application name with two separate revisions/uninstallers. How can we do something similar?
Re: Add/Remove Program Entry
Posted: Wed Apr 11, 2012 11:13 am
by FrancescoT
Dear User,
In your screenshot you have the exact same application (that shares same files and installation codes) but two dfferent release versions and I suspect that it is generated by a patch installation of "Microsoft Redistributable. In Fact, the last one installed it is only 300 KB larger.
So in your case are not two applications that have the same name, but two versions of the same application, where the most recent entry it is an update.
In this particular case and following the Microsoft Installer documentation it is a "minor upgrade" Patch install.
Your intentions, if I have not missed anything, it is to have two different applications that have the same name ... that I quite think it is not possible.
Regards