SQL Script Condition - Advanced Installer Community

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!

alexdoan
Posts: 6
Joined: Thu Nov 15, 2007 11:03 pm

SQL Script Condition

how do i create a SQL Script Condition to check for registry value or check the previous version of software during an upgrade/install?

I want to check if [current installed product version = 3.6], then run script.

I looked and I don't see how you can check to see the current version of the product being installed.

I write a registry key value on each install, so I can check a registy key.
--> is this possible?

can i check for current/previous install product code/key?
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,

Since you are writing registry entries for each installation package, you can use them to set a condition for the SQL script.

First, you need to create a search in the "Search" page. You can read more about this here:
http://www.advancedinstaller.com/user-guide/search.html

After this, you can use the property of the search (its default name is RESULT_PROPERTY) as a condition for the script. If the search was successful, the property will contain the path of the registry entry, otherwise, the property will be empty.

Let me know if you encounter any problems with this approach.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”