Registry read InstallLocation

Got a problem you cannot solve? Try here.
Jenny
Posts: 2
Joined: Tue Feb 23, 2021 10:15 am

Registry read InstallLocation

Postby Jenny » Tue Feb 23, 2021 10:35 am

Hi all,

We need to read the InstallLocation of main software to be able to install additional features.
I tried this command
Read Registry Key HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{3FFEDCC8-20DB-4361-8E21-68DB28A81539}\InstallLocation into INSTALL_LOCATION

But result is always empty.
Is there an other solution for detecting installation directory of a software.

Thanks for your help
Best regards

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

Re: Registry read InstallLocation

Postby FrancescoT » Tue Feb 23, 2021 12:25 pm

Did you check "manually" if this exists?
Are you querying the reg-key of a x64 target OS?
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

Jenny
Posts: 2
Joined: Tue Feb 23, 2021 10:15 am

Re: Registry read InstallLocation

Postby Jenny » Tue Feb 23, 2021 4:46 pm

Hi thanks for your answer,

It exists manually.
It is a x64 system and I tried
Read Registry Key HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\product name\InstallLocation into INSTALL_LOCATION
which works.

Thanks for your help.
Best regards

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

Re: Registry read InstallLocation

Postby FrancescoT » Wed Feb 24, 2021 6:45 am

I would recommend you to not use such approach. Because this may compromise the default registry key redirection operated by the target operating system.

By default, the setup engine runs in 32 bit mode (if not forced to 64 bit explicitly via “Set 64 Bit mode”).

Consequently, any script command used to query a “know System Folder” or to query/manuìpulate a "Registry Key", due native OS redirection, this will return the respective x86 or x64 system path, depending on the currently active "processor architecture" defined with the script.

https://www.installaware.com/forums/viewtopic.php?f=2&t=10813

Hope this helps you.
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: Baidu [Spider] and 46 guests