Registry search returning wrong path - Advanced Installer Community
prasadus92
Posts: 58
Joined: Wed Feb 25, 2015 8:10 am

Registry search returning wrong path

Hi,

I have included a search in my installer which searches for Outlook.exe. This will be under HKLM\Software\Windows\Current Version\App Paths\Outlook.exe with a Path key (HKLM\Software\Windows\Current Version\App Paths\Outlook.exe\Path). The problem is, this Path key contains "C:\Program Files\Microsoft Office 15\Root\Office 15\" but when I use this in my installer, and try to launch Outlook.exe (at the end of installation) from this location using this registry search, some how its getting as "C:\Program Files(x86)\Microsoft Office 15\Root\Office 15\" and its resulting an error. Why is this happening? Is there something that I am missing? I am running the Advanced Installer 11.4.1 and I have a Professional license.

Thanks in advance.
Prasad
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Registry search returning wrong path

Hi Prasad,

You need to have a 64-bit package to resolve 64-bit locations. See Package Definition section -> Install Parameters Page.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
prasadus92
Posts: 58
Joined: Wed Feb 25, 2015 8:10 am

Re: Registry search returning wrong path

Hi Mihai,

Thanks for the reply.

Whether my installer has to be a 64-bit package? Or whether the Outlook installation needs to be a 64-bit installation?

Thanks
Prasad
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Registry search returning wrong path

Hello Prasad,

This is the standard Windows Installer behavior when using a 32-bit package type. All 64-bit paths from search results are redirected to 32-bit paths. To avoid this behavior, you should change the package type as my colleague Mihai instructed.

Please take a look on the "64 bit Registry problems" thread which debates a similar issue.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
prasadus92
Posts: 58
Joined: Wed Feb 25, 2015 8:10 am

Re: Registry search returning wrong path

Hi Daniel,

Thanks for the reply.

Is it possible to use our own EXE that returns the 64-bit path irrespective of the package type? Maybe running this EXE as a custom action? But I am not sure how we can save this data that's returned by this EXE even if this way is possible.

Thanks in advance.
Prasad
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Registry search returning wrong path

Hello Prasad,

Yes, this is possible. However, you should convert your EXE into a DLL so that you can set an installer property with the result. Unfortunately, you cannot get/set installer properties within EXE custom actions. So, you should develop your custom action as a DLL and save the result into a property within your DLL code. At last you could launch it using a "Call function from attached native DLL".

Please take a look on our "C# custom action example" and "C++ custom action example" articles so you can see how to set installed property within your custom action code.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
prasadus92
Posts: 58
Joined: Wed Feb 25, 2015 8:10 am

Re: Registry search returning wrong path

Hi Daniel,

Many thanks for the info.

I will try this out.

Thanks
Prasad
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Registry search returning wrong path

You're welcome.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”