Detecting if a custom program is already installed and taking its settings

Got a problem you cannot solve? Try here.
jessican
Posts: 29
Joined: Fri May 13, 2016 9:01 am

Detecting if a custom program is already installed and taking its settings

Postby jessican » Mon Jun 13, 2016 8:32 am

Hi there!

I'd like to know how to make the installer detect if a custom program is already installed on a computer
and if it is installed, to take settings (PATH values/environment variables, etc.)

Basically - I'd like to program to take over the same path values, environment variables as another program its replacing.
(A very old version of the same program, installed using installShield)

Also - Can my package make this other old program to uninstall ?

Thanks!!

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Detecting if a custom program is already installed and taking its settings

Postby FrancescoT » Mon Jun 13, 2016 12:49 pm

Dear Jessican,

I have already replied to you about this matter when you asked a similar question.

You can query the target registry to check for an installed package.

This information is stored under:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\<PRODUCTCODE>
or (if it's a native 32 bit package installed on a x64 system)
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\<PRODUCTCODE>

*where <PRODUCTCODE> is the GUID assigned to the specific third party product. This is generally the same and identical with different version of the same product.

To find the <PRODUCTCODE> you need to manually search through the registry of a system where the package is already installed, or in case you developed the package, use the its productID.

To uninstall the package, you can query the value of "UnInstallString" key from the same registry path.
Then you can use the "UnInstallString" with "Run Program" or eventually with "(un)Install MSI package" (if a MSI package).

The above registry path also stores the path where the package has been installed ...if I recall, it should be the "InstallDir" key.

For what concerns environment variables, unless the setup package stores such information somewhere (by default it doesn't), the only option is to query the target system for that variables.

Hope this helps you.

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

jessican
Posts: 29
Joined: Fri May 13, 2016 9:01 am

Re: Detecting if a custom program is already installed and taking its settings

Postby jessican » Mon Jun 13, 2016 1:59 pm

thank you!, by query do you mean the read registry function ?

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Detecting if a custom program is already installed and taking its settings

Postby FrancescoT » Mon Jun 13, 2016 2:04 pm

Yes, I mean to read for that specific registry Keys of course.
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


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 156 guests