Add/Remove Program Entry
-
GLSchrader
- Posts: 6
- Joined: Fri Mar 23, 2007 2:26 pm
Add/Remove Program Entry
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?
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?
-
Alex_Ronquillo
- Site Admin
- Posts: 364
- Joined: Mon Jul 30, 2007 11:51 am
- Location: USA
- Contact:
What you can do is include the following code line right after the previous version uninstallation:
Basically, the code will end up being:
Code: Select all
Delete Registry KEY HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\$PRODUCTCODE$\\*.*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$\\*.*Alejandro Ronquillo
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
-
GLSchrader
- Posts: 6
- Joined: Fri Mar 23, 2007 2:26 pm
Add/Remove Program Entry
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.
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.
-
GLSchrader
- Posts: 6
- Joined: Fri Mar 23, 2007 2:26 pm
Add/Remove Program Entry
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
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
-
Alex_Ronquillo
- Site Admin
- Posts: 364
- Joined: Mon Jul 30, 2007 11:51 am
- Location: USA
- Contact:
-
[email protected]
- Posts: 55
- Joined: Wed Mar 11, 2009 5:26 pm
- Contact:
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
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
remove also the key
HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\PRODUCT_NAME_1
as GLSchrader described above:
I had the same problem but now it workes as desired.
Thx to GLSchrader!
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$\\*.*
Thx to GLSchrader!
Re: Add/Remove Program Entry
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.
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.
-
FrancescoT
- Site Admin
- Posts: 5361
- Joined: Sun Aug 22, 2010 4:28 am
Re: Add/Remove Program Entry
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
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
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
Re: Add/Remove Program Entry
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
...but only one application shows up in Add/Remove Programs
-
FrancescoT
- Site Admin
- Posts: 5361
- Joined: Sun Aug 22, 2010 4:28 am
Re: Add/Remove Program Entry
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
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
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
Re: Add/Remove Program Entry
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.
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.
-
FrancescoT
- Site Admin
- Posts: 5361
- Joined: Sun Aug 22, 2010 4:28 am
Re: Add/Remove Program Entry
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
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
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
Re: Add/Remove Program Entry
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?
-
FrancescoT
- Site Admin
- Posts: 5361
- Joined: Sun Aug 22, 2010 4:28 am
Re: Add/Remove Program Entry
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
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
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

