Odd behavior on Execution 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!

DannyLin
Posts: 7
Joined: Thu Jun 25, 2009 6:55 am

Odd behavior on Execution Condition

I have a project needs to detect if k-lite is the latest version, if not, we upgrade it.

At first, I create a search called "KLITE" to retrieve the registry value

then in the custom actions, we install it according to the execution condition.

this is my Execution condition, ( (NOT KLITE) OR (KLITE ~= 485) )

"KLITE ~=485 " to detect if the KLITE installed is exactly the one we are going to install.
"NOT KLITE" to detect if the registry can be found, if not found, we install it.

the weird thing is it works when i try either one. but not together.
the OR seems not working at all.

please help
thanks
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Odd behavior on Execution Condition

Hi,

Please note that the property values are stored as strings, so the correct condition would be:

Code: Select all

(NOT KLITE) OR (KLITE ~= "485")
If the problem persists even when using this condition, please send us the .AIP (project) file and a verbose log of the install process with the problem to support at advancedinstaller dot com so we can investigate them.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
DannyLin
Posts: 7
Joined: Thu Jun 25, 2009 6:55 am

Re: Odd behavior on Execution Condition

cosmin wrote:Hi,

Please note that the property values are stored as strings, so the correct condition would be:

Code: Select all

(NOT KLITE) OR (KLITE ~= "485")
If the problem persists even when using this condition, please send us the .AIP (project) file and a verbose log of the install process with the problem to support at advancedinstaller dot com so we can investigate them.

Regards,
Cosmin
Hi cosmin,

After i give more trys on it, I found the problem looks not like the "OR" operator.
it seems (KLITE ~="485" ) does not have a correct result.

here is have a question about the search.
Becuase this KLITE looks for a property value which is DWORD.
From the regedit, It says 0x000001e5 (485) and the search returns 1: #485.
In this Dword case, how should i write my condition to do the comparison ?
I test both cases with and without "", but see no any difference.

btw, i'm using exe bootstrapper, don't know if it matters.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Odd behavior on Execution Condition

Hi,

For DWORD values the result of the registry search will have a "#" character in front of the actual value. This is mentioned in the Registry Location Properties article. Therefore, the condition would be:

Code: Select all

(NOT KLITE) OR (KLITE ~= "#485")
Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
DannyLin
Posts: 7
Joined: Thu Jun 25, 2009 6:55 am

Re: Odd behavior on Execution Condition

cosmin wrote:Hi,

For DWORD values the result of the registry search will have a "#" character in front of the actual value. This is mentioned in the Registry Location Properties article. Therefore, the condition would be:

Code: Select all

(NOT KLITE) OR (KLITE ~= "#485")
Regards,
Cosmin

after add # in front of the version no....it's working now...
many thanks...cosmin

Return to “Common Problems”