cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
microstar
Level 5

Feature allways installs

In my project I have got a feature. That feature should only install when a global variable IDEMO=2. For that end I made a custum action with a dialog. The dialog contains an option group that can have the value 1 or 2. That option group is associated with the variable IDEMO. But when I run the installshield project the feature allways installs. Wether or not I check the first (value=1) or the second (value=2) option button. Anyone an idea??
Labels (1)
0 Kudos
(11) Replies
KathyMorey
Level 10

What kind of project are you using?
0 Kudos
microstar
Level 5

It is a Basic MSI Project....:)
0 Kudos
KathyMorey
Level 10

Can you describe in more detail how you set this up? Are you using IDEMO=2 in your feature condition? (Have you tried IDEMO="2"?) Are you using radio buttons (as opposed to checkboxes)? Have you tried logging the installation and verifying the value of the property, and checking to see what the features' states are?
0 Kudos
microstar
Level 5

I did not try IDEMO="2". I haven't thought of that yet 😉

In the dialog I use radio buttons (not checkbuttons).
I also didn't log the msi. I just saw that the feature did install, so the value had to be wrong (?). But I will try to log it. You will hear the result.
It can take some days but I will let you know Kathy. Thanks
0 Kudos
microstar
Level 5

By the way:
I made a dialog with an optiongroup. I associated the optiongroup with the variable IDEMO. The values of the two radio buttons are 1 and 2.
0 Kudos
microstar
Level 5

I just logged the setup and saw that the variable has been set correct, so it was 1 when I set 1 and 2 when checking the option 2.
0 Kudos
KathyMorey
Level 10

Properties are always strings, so I'd bet that checking for "2" will do it for you.
0 Kudos
microstar
Level 5

Yes Kathy. After some failures it installs properly. It had to be a string in stead of a number. Thanks..
0 Kudos
microstar
Level 5

By the way Kathy,
when I set the default value of IDEMO I HAVE to use IDEMO=2, without the quotes. IDEMO="2" did not work. A bit inconsistent isn't it?
0 Kudos
KathyMorey
Level 10

I suspect that's because the IDE knows that whatever you type in the default value will be a string, where the conditional statements don't know that you mean a string unless you put quotes around it...
0 Kudos
microstar
Level 5

Could be yes. But I still think it should accept "2" anyway.
But thanks for your help Kathy. ...
0 Kudos