Can't find registry key - Advanced Installer Community
hadas
Posts: 43
Joined: Mon Jan 06, 2014 10:53 am

Can't find registry key

Hi,

I'm in the process of evaluating Advanced Installer. so I have few questions:
I'm using lunch condition in order to check if postgreSQL is installed.
The destination computer is Win 7 and postgreSQL is installed and can be find in the registry under, but the condition is failing :
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\PostgreSQL 9.1
the search for InstallLocation is failing as well.
I also have similar condition for existing registry key, this is working fine:
HKLM\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\PixeLINK Camera Kit 4.2_is1

The second question is regarding Digital Signing. We have 3rd party signed exe files that we are using. Can I signed only the MSI and not the files inside?

Thanks,
Hadas
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Can't find registry key

Hi and welcome to Advanced Installer forums.

Thank you for your interest in Advanced Installer.
The destination computer is Win 7 and postgreSQL is installed and can be find in the registry under, but the condition is failing :
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\PostgreSQL 9.1
the search for InstallLocation is failing as well.
Please keep in mind that the installer is searching by default only in the 32-bit registry locations (under Wow6432Node), but if you want to search in a 64-bit location, you can check the "Search the 64-bit portion of the registry" option for your search. Can you test this and see if it works?
The second question is regarding Digital Signing. We have 3rd party signed exe files that we are using. Can I signed only the MSI and not the files inside?
Yes, in order to achieve this you can go in the Digital Signature page, and in the "Files Configured for Signing" section select the files that you want to sign.

Let us know if this helped, otherwise give us more details about your scenario.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
hadas
Posts: 43
Joined: Mon Jan 06, 2014 10:53 am

Re: Can't find registry key

Hi,
Thanks for the fast replay.
I've tried using the 64 properties with no success

I also trying to run cmd file as part of the installation.
Here is the aip I'm working on
Hadi test.aip
(13.15 KiB) Downloaded 792 times
and the cmd file that contains only notepad.exe command

When I run the installation the cmd window is left open after the bat is finished.
Can you help with this

Thanks,
Hadas
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Can't find registry key

Hi Hadas,
I've tried using the 64 properties with no success
I'm not sure why you encounter this behavior, I tested the searches created in your project and they are executed successfully on my machine when the Search the 64-bit portion of the registry" option is selected. Are you sure that those registry entries exist on your machine to the location specified in your project?
When I run the installation the cmd window is left open after the bat is finished.
The correct way to execute a batch file in a "Launch File" custom action is to write the name or the path to the batch file in the "File To Launch" field as follows:
  • File To Launch: [#test.cmd]
Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
hadas
Posts: 43
Joined: Mon Jan 06, 2014 10:53 am

Re: Can't find registry key

Eusebiu wrote:Hi Hadas,
I've tried using the 64 properties with no success
I'm not sure why you encounter this behavior, I tested the searches created in your project and they are executed successfully on my machine when the Search the 64-bit portion of the registry" option is selected. Are you sure that those registry entries exist on your machine to the location specified in your project?
Postgres in registry
post.png
post.png (99.51 KiB) Viewed 18989 times
, so I still can't find what is worng.
When I run the installation the cmd window is left open after the bat is finished.
The correct way to execute a batch file in a "Launch File" custom action is to write the name or the path to the batch file in the "File To Launch" field as follows:
  • File To Launch: [#test.cmd]
Best regards,
Eusebiu
I figure this out, thanks (The help is a little misleading). If I'll have parameters for a bat file that includes spaces and there is a need to use quote around the parameter, how to deal with that?

Thanks
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Can't find registry key

Hi Hadas,
so I still can't find what is worng.
Indeed, I reproduced the behavior and it seems that the "The value contains a path to a directory" search type causes the problem, however it works when the "Retrieve the row value" search type is set. Can you test this and see if it works for you, too? Please note that in order to test a search, the [Test Search] toolbar button is available, so you don't have to run the package every time.

Also, will will investigate this problem to see what is its source and we will try to fix it in a future version of Advanced Installer. Thank you for bringing it to our attention.
If I'll have parameters for a bat file that includes spaces and there is a need to use quote around the parameter, how to deal with that?
If you have parameters for a BAT file you can write them in the "Command Line" field and you can also use quotes for them if needed.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
hadas
Posts: 43
Joined: Mon Jan 06, 2014 10:53 am

Re: Can't find registry key

Hi Eusebiu,

Thanks, firstly for the solution, it worked fine, and secondly for telling me about the Test Search button, very nice.
Please keep in mind that the installer is searching by default only in the 32-bit registry locations (under Wow6432Node), but if you want to search in a 64-bit location, you can check the "Search the 64-bit portion of the registry" option for your search.

Don't forget that the registry key exists search isn't working because of the 64-bit issue.

I'll try the bat parameters. Do you have any suggestion of how to debug when bat file is failing. If I run the bat from cmd window it works fine.

Thanks,
Hadas
Last edited by hadas on Tue Jan 14, 2014 2:27 pm, edited 1 time in total.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Can't find registry key

Hi Hadas,

You're welcome. Glad to help.

When a BAT file fails, a message is displayed, the installation is interrupted and the "Show log" option is displayed on the "FatalError" dialog. So you can check that option and search in the log file the message that was displayed, to see if the parameters to the BAT file were passed correctly.

Also, most often a custom action can fail because of the limited privileges, so make sure that your BAT file has the necessary privileges when it is executed.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
hadas
Posts: 43
Joined: Mon Jan 06, 2014 10:53 am

Re: Can't find registry key

Hi,

Still going around the registry problem:
The search
The search
postgres.png (35.54 KiB) Viewed 18961 times
The search value is C:\Program Files (x86)\PostgreSQL\9.1 instead of C:\Program Files\PostgreSQL\9.1
I need the value later on, to run bat files.


Thanks,
Hadas
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Can't find registry key

Hi Hadas,

Indeed, this is the Windows Installer normal behavior. For more details you can take a look on the "Search Registry does not return Raw Value" and "copy file path force x86" threads which debate a similar problem.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”