We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

LCharlier
Posts: 13
Joined: Fri Jun 12, 2009 8:52 pm
Location: Lafayette, Louisiana, USA
Contact: Website

Creating sequential (ordered) registry searches

Began utilizing AI's built-in search capabilities but I seem to have hit a stumbling block...

I need to be able to issue three registry searches in a specified order such that Search #2 uses a registry hive incorporating the result from Search #1 followed by Search #3 using a registry hive incorporating results from both Search #1 and Search #2. An example (result variables are shown on left-hand side of search definition):

Search #1:
ACMAJOR = HKCU\Software\Autodesk\AutoCAD\CurVer

Search #2:
ACMINOR - HKCU\Software\Autodesk\AutoCAD\[ACMAJOR]\CurVer

Search #3:
ACPATH = HKLM\Software\Autodesk\AutoCAD\[ACMAJOR]\[ACMINOR]\AcadLocation

Unfortunately, it appears that all three searches are issued asynchronously resulting in only Search #1 being successful. Is there a way to achieve the result I am looking for?

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

Re: Creating sequential (ordered) registry searches

Hello,

Not sure why it is not working for you.
I am attaching a sample project that implements this behavior:
sample.zip
(678.9 KiB) Downloaded 287 times
Let me know it worked for you.

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
LCharlier
Posts: 13
Joined: Fri Jun 12, 2009 8:52 pm
Location: Lafayette, Louisiana, USA
Contact: Website

Re: Creating sequential (ordered) registry searches

Gabriel,

Same result. Even when I try your example project, pressing "Test" on the first result yields the correct registry value yet pressing "Test" on the second result yields nothing - even though the registry entries are present.

Does this work only in the real install and not the "Test" mode?

Thanks.
Attachments
RESULT_PROPERTY_2
RESULT_PROPERTY_2
RESULT_PROPERTY_2.png (56.89 KiB) Viewed 5342 times
RESULT_PROPERTY
RESULT_PROPERTY
RESULT_PROPERTY.png (52.46 KiB) Viewed 5342 times
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Creating sequential (ordered) registry searches

Hi,

Unfortunately Windows Installer doesn't guarantee the searches order. Therefore, using a search result in another search is not recommended. A solution is to use a custom action which performs the searches in the order you need.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
LCharlier
Posts: 13
Joined: Fri Jun 12, 2009 8:52 pm
Location: Lafayette, Louisiana, USA
Contact: Website

Re: Creating sequential (ordered) registry searches

Project driving original posting was temporarily shelved (for >2 years!). Now resurrected, I'm seeking help implementing sequential registry search using custom action(s). Can you provide an example?

To reiterate specifically what I'm trying to do:
  • - Search registry for key and store result in custom property (ACMAJOR).
  • - Append custom property to registry path and search registry again storing result in yet another custom property (ACMINOR).
  • - Search registry a third time using first two custom properties appended to designated registry path.
Any help implementing using custom action(s) is very much appreciated. Thanks
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Creating sequential (ordered) registry searches

Hello,

I'm afraid we don't have any examples regarding this scenario. As my colleague mentioned in the previous post you should try to implement a custom action in order to achieve what you want.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
LCharlier
Posts: 13
Joined: Fri Jun 12, 2009 8:52 pm
Location: Lafayette, Louisiana, USA
Contact: Website

Re: Creating sequential (ordered) registry searches

The point behind my last posting was that I cannot, from the docs, divine how to create a registry search as a custom action - as suggested in an earlier post. According to the docs:

"During the installation process, Windows Installer executes a sequence of actions. You can add your own Custom Actions: executable files, dynamic linked libraries, Visual Basic scripts or JavaScript files."

I understand that I can write an external program and call it from Advanced Installer - I was trying to avoid that. Considering what I want to do is rather rudimentary and easily done using other installer programs (although I otherwise prefer Advanced Installer over them), I find the inability to natively implement a sequential search to be a glaring omission.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Creating sequential (ordered) registry searches

Hello,

You can take a look on "Search for registry key in all of the subkeys of a path" article which may be helpful for you.

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

Return to “Common Problems”