TedN
Posts: 14
Joined: Fri Sep 30, 2005 6:21 pm
Contact: Website

What is wrong with this Launch Condition?

I am attempting to abort the installation if the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows CE Services\MajorVersion DWORD registry value is less than 4.

First, I created a Search named ACTIVESYNC using the Search Wizard with the following properties:

Root: HKEY_LOCAL_MACHINE
Key: SOFTWARE\Microsoft\Windows CE Services
Name: MajorVersion
Type: Retrieve the raw value

Next, I created a Launch Condition of:

ACTIVESYNC < 4

The actual Registry value of HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows CE Services\MajorVersion is a DWORD of 4

The problem is that the condition is always true and the Launch Condition Description string is always displayed. I tried changing the Launch Condition to ACTIVESYNC > 4 but the conditon is still always true and the message box is displayed with my Launch Condition description.

Can someone tell me what I'm doing wrong?

Thanks.
Ionut
Posts: 605
Joined: Tue Nov 22, 2005 11:29 am
Contact: Website

Hi,

Windows Installer adds a prefix to the registry value that identifies the type of that value. For a DWORD value, this prefix is "#". Therefore, your launch condition will be:

Code: Select all

ACTIVESYNC >= "#4"
Note that the Launch Condition specifies a condition that must be satisfied in order for the package to be installed.

It might be helpful to see the value of your property before the Launch Condition is executed. In order to do this add a "Script Inline" Custom Action on the "AppSearch" Standard Action from the InstallUISequence (not InstallExecuteSequence, because it would be too late). Set the Script Text to:

Code: Select all

MsgBox Session.Property("ACTIVESYNC")
Hope this helps.

Regards,
Denis
Denis Toma
Advanced Installer Team
http://www.advancedinstaller.com/

Return to “Common Problems”