Or anyone that might know. Phil, I've read you book, it was very helpful,
however this Search Registery and Condition problem I'm having is about to
make me jump off the edge.
I've created a deployment project and decided I wanted to use the Registry
Search feature setup as follows:
Search Target Machine
Search for my Environment
Property: MYENVMODE
RegKey: SOFTWARE\MyApp
Root: vsdrrHKLM
Value: Version
Launch Conditions
MyCondition
Condition: MYENVMODE >= "3.0.0.0"
Message: "Condition True!"
If I create a registry key: HKEY_LOCAL_MACHINE\SOFTWARE\MyApp
then create a string value Version
If do the following:
set Version = "3.0.0.0", Message displays "Condition True!"
set Version = "2.9.1.1", Message displays "Condition True!"
set Version = "3.1.1.1", Message displays "Condition True!"
If change Condition: MYENVMODE = "3.0.0.0"
set Version = "3.0.0.0", Message displays "Condition True!"
set Version = "2.9.1.1", Message displays "Condition True!"
set Version = "3.1.1.1", Message displays "Condition True!"
If change Condition: MYENVMODE < "3.0.0.0"
set Version = "3.0.0.0", Message displays "Condition True!"
set Version = "2.9.1.1", Message displays "Condition True!"
set Version = "3.1.1.1", Message displays "Condition True!"
If change Condition: MYENVMODE <> "3.0.0.0"
set Version = "3.0.0.0", Message displays "Condition True!"
set Version = "2.9.1.1", Message displays "Condition True!"
set Version = "3.1.1.1", Message displays "Condition True!"
As you can see, it doesn't matter what I do, this always evalutes to true
and triggers the condition. Do conditions just NOT work? I've read several
other people have the exact same problem. Just for reference, when testing,
I right click on the deployment project in VS 2005 and select "Install".
What the heck am I doing wrong? I'm stumped -- been working on this all
day!
Thanks, Rob.
Phil Wilson - 15 May 2006 20:30 GMT
What's the actual format of the data in the registry? Is it really REG_SZ?
If you go to the user interface sequence and put [MYENVMODE] at the start of
the WelcomeText string you'll see the actual value, just as a sanity check.

Signature
Phil Wilson
[Microsoft MVP-Windows Installer]
> Or anyone that might know. Phil, I've read you book, it was very helpful,
> however this Search Registery and Condition problem I'm having is about to
[quoted text clipped - 48 lines]
>
> Thanks, Rob.
Rob R. Ainscough - 17 May 2006 19:58 GMT
Hi Phil,
The reg entries are being found (via Search for Registry Entry) and loaded
into the property -- the "Conditions" evaluation on the creation of reg
entries during the install are working correctly (registry editor section).
Just the Launch Actions Condition statements don't appear to be working at
all (Launch Conditions section). Has me baffled.
The Welcome displays a blank space, and yes they are REG_SZ.
Rob.
> What's the actual format of the data in the registry? Is it really REG_SZ?
>
[quoted text clipped - 54 lines]
>>
>> Thanks, Rob.
Phil Wilson - 18 May 2006 00:30 GMT
If you're putting the property name in square brackets in the correct case
in the Welcome text and it's blank, that means you're not getting the value
into the property. If I do a registry search for [Property MDACVER RegKey
SOFTWARE\Microsoft\DataAccess Root vsdrrHKLM and Value Version] I definitely
see 2.82.1830.0 in the Welcome screen. Maybe you're not getting the value,
the property value is empty, and that might be making every comparison
evaluate to true.

Signature
Phil Wilson [MVP Windows Installer]
----
> Hi Phil,
>
[quoted text clipped - 67 lines]
>>>
>>> Thanks, Rob.
Rob R. Ainscough - 18 May 2006 20:36 GMT
That is what I would have thought also -- but that wouldn't explain why the
same property reference in a condition statement for creating a registry
entry would work correclty.
Are Launch Conditions evaluated before registry searches ?? This is the
only conclusion I can come to.
> If you're putting the property name in square brackets in the correct case
> in the Welcome text and it's blank, that means you're not getting the
[quoted text clipped - 74 lines]
>>>>
>>>> Thanks, Rob.
Phil Wilson - 20 May 2006 19:00 GMT
The registry searches (and the other searches) take place before the launch
conditions. That blank in the Welcome text bothers me - it should show a
value. If you do the install with a log it will show property values too. I
just think it's not being set.
msiexec /i <path to msi> /l*v <path to some text log file>

Signature
Phil Wilson
[Microsoft MVP-Windows Installer]
> That is what I would have thought also -- but that wouldn't explain why
> the same property reference in a condition statement for creating a
[quoted text clipped - 81 lines]
>>>>>
>>>>> Thanks, Rob.