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!

nurikabe
Posts: 2
Joined: Fri Jul 12, 2019 12:41 pm

Search conditions as variables in Visual Basic

Sorry for the newbie question. Let's say I set up search for a registry item. Is it possible to access the search identifier as a Visual Basic variable inside a custom action?

Thanks in advance
Catalin
Posts: 7853
Joined: Wed Jun 13, 2018 7:49 am

Re: Search conditions as variables in Visual Basic

Hello and welcome to Advanced Installer forums,
Is it possible to access the search identifier as a Visual Basic variable inside a custom action?
Yes, that is possible. As you may already know, the result of the search is saved in a property. With that being said, all we have to do is to get the value of that property and save it in a variable in our script.

In order to get the value of a property in your Visual Basic script, you can proceed as it follows:

Code: Select all

MyVariable = Session.Property("MyProperty")
If you want to set the value of a property in your Visual Basic script, you can proceed as it follows:

Code: Select all

Session.Property("MyProperty") = "MyValue"
Hope this helps.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”