ramit
Posts: 90
Joined: Thu Dec 18, 2008 11:51 am

How to check isntalled old version

Hi,

I created installers for multiple versions for same Product like installer for following versions.

1) Product 11.1.0.0
2) Product 11.2.0.0
3) Product 11.3.0.0
4) Product 11.4.0.0

Above installers contain UI and Services in it and if I want to install any new version of Product then it asks to uninstall the old version because the Product Code for all the above installer is same.

Now I need separately create UI installer and Services installer (so I feel I can not user the same installer as I was using earlier means same Product Code) and these UI and Service installer can be installed on same machine or different machine. But still want if old version 11.x is available on the machine then it should prompt to uninstall.

I am not getting how to check whether the old version is already installed.

Note:- In old versions installer, I did not maintain any Registry Entry for Product.

Please suggest me if any way is there.

Thanks,
Amit
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: How to check isntalled old version

Hello,

Your approach was not entirely correct by using the same Product Code for different versions of your application. They should have had different product codes.
This being said, use new product codes for your new UI installer and Service installer. Create an extended search for the product code of your previous versions. Display an Error Message depending on whether or not the search succeeded, or take some other action of your choosing.

Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
ramit
Posts: 90
Joined: Thu Dec 18, 2008 11:51 am

Re: How to check isntalled old version

Thanks for reply.

Thanks,
Amit
ramit
Posts: 90
Joined: Thu Dec 18, 2008 11:51 am

Re: How to check isntalled old version

I Created a search for Component and added that in "Custom Launch Conditions" in Prerequisites.
But it is prompting me each time if old version installer is installed or not.

OR

Do i need to add this in Prerequisites, Software Prerequisites search.

I am not getting this correctly. Please help me in this.

Thanks,
Amit
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: How to check isntalled old version

Hi Amit,

Gabriel was referring to an extended search in the "Search" page. This feature was added in Advanced Installer 7.1. If you have an older Advanced Installer version, you can try using a custom action to detect if a product is installed.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
ramit
Posts: 90
Joined: Thu Dec 18, 2008 11:51 am

Re: How to check isntalled old version

Oh, I have Advance Installer 6.3.

Can you please tell me, when we install any product where it creates its entry in Registry, so I can check the product code there.
I searched the Product code in Registry and I found that in many places, so I get confused which one I should check

Basically I want to know that in registry is there any please where installer makes entry when it get installed and remove the entry when it gets uninstalled.

Or as you mentioned I need to create custom action. Is there any custom action available that can perform this job or I need to write VBScript code (but again if I need to write VBScript code then I will again stuck “Where to check that old version is installed”)

Please suggest.

Thanks
Amit
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: How to check isntalled old version

Hello,

MSI based installers have a key named with the Product Code in the following locations:
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall (for 32bit installers)
HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall

Search both locations on 64bit OSes.

Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
ramit
Posts: 90
Joined: Thu Dec 18, 2008 11:51 am

Re: How to check isntalled old version

Hi,

I added the search, please find the attached screenshot.
Search for 32 bit
Search for 32 bit
Search.JPG (39.99 KiB) Viewed 12459 times
And added the search in "Custom Launch Conditions" in Prerequisites, but still it is displaying message in both the case if old version is installed or not.
Search in "Custom Launch Conditions" in Prerequisites
Search in "Custom Launch Conditions" in Prerequisites
SeachCondition.JPG (13.09 KiB) Viewed 12459 times
Please suggest.

Thanks
Amit
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: How to check isntalled old version

Hi Amit,
but still it is displaying message in both the case if old version is installed or not.
This could happen from two reasons:
-- either the search isn't correctly configured, this means it will always have an empty value
-- or the product code of your package is different

Here is how you can easily see to what value is your search resolving:
-- create a .vbs file in which you write this:

Code: Select all

MSgBox "The value of the search is:  " & Session.Property("CHECKOLDVERSIONIN32BITS") 
-- now go to Custom Actions page and show the standard action "AppSearch" under "InstallUISequence"
-- under it add the VBScript as a "New Attached Custom Action"

Rebuild and run the package, before the launch conditions you should see a message ox in which the value of the search is displayed.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
ramit
Posts: 90
Joined: Thu Dec 18, 2008 11:51 am

Re: How to check isntalled old version

Yes you are correct.
The search value is empty value for both the cases.

Now what should I do?

can you please tell me that is i am adding Key correctly (in below image)

Thanks
Amit
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: How to check isntalled old version

Hi Amit,

From what I see you are using the search to retrieve the raw value from a registry value. But I cannot know if that
key exists on your machine or it contains something.

I recommend the following:
-- go to Search page and create a "New Extended Search"
-- set the "Criteria" field to "Registry key exists"
-- and the select the registry key corespondent to the product code of the package you are searching for
-- remove the previous search, because as you can see is not correctly configured

Test this new package, it should work correctly.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
ramit
Posts: 90
Joined: Thu Dec 18, 2008 11:51 am

Re: How to check isntalled old version

I think "New Extended Search" is in Advance Installer 7.1.
I am having Advance Installer 6.3 and "New Extended Search" is not there in this.

Is there any other alternate for this. Please suggest and Thanks for that much efforts.

Amit
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: How to check isntalled old version

Hi Amit,

Indeed, this option doesn't exist in that version of Advanced Installer, you can download the latest one (7.6.1) from this page
and use it as trial just to see if you can create you project correctly.

If your maintenance plan has expired you can purchase a renewal from the following page.
Is there any other alternate for this. Please suggest and Thanks for that much efforts.
There is only one solution that you have (besides the Search page) which you can use in your version of Advanced Installer.
That is to create a custom action that will perform the search and set a public property depending on what it finds in the registry. The custom action should be
added on the "Begin" standard action in InstalUISequence.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”