cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
trevrobwhite
Level 4

Bitwise Operators - MSI

Does anyone know how bitwise operators should be entered into a Custom action condition, I want a custom action to launch if my UILevel is 4 but optionally to also run if the bitwise operators 32 or 128

Thanks.
Labels (1)
0 Kudos
(6) Replies
Not applicable

The only valid values for UILevel are 2, 3, 4, and 5.

However, Microsoft documents the Conditional Statement Syntax for MSI conditions here:
http://msdn2.microsoft.com/EN-US/library/aa368012.aspx
0 Kudos
trevrobwhite
Level 4

bryanwolf wrote:
The only valid values for UILevel are 2, 3, 4, and 5.

However, Microsoft documents the Conditional Statement Syntax for MSI conditions here:
http://msdn2.microsoft.com/EN-US/library/aa368012.aspx


You can also have 32, 64 and 128 as bits on these values, often people who use my installer Hide the Cancel button using 32, which is why I raised the question
0 Kudos
RobertDickau
Flexera Alumni

I think it's a pair of confusing names: the value of Installer.UILevel (which you can query in a script custom action) can contain those bit flags, but the UILevel property (in a script using Session.Property, or used directly in a component/action/whatever condition) from the supports only the list of values that Bryan mentioned.

P.S. There are also MsiUIHideCancel and MsiUIProgressOnly properties that might be of use.
0 Kudos
trevrobwhite
Level 4

Ah thanks Rob, I saw in help "Conditional Statement Syntax" Bitwise numeric operators and thought they applied to that property.

Out of interest how to you use the Bitwise numeric operators as I don't really understand the help, these are the operators ><, << and >>

Cheers.
0 Kudos
RobertDickau
Flexera Alumni

From memory I can't think of any properties that are bit flags, but the general format seems to be a><b. If I add two text controls to InstallWelcome with text "1><2" and "1><3", and then add identical conditions to Disable control events for the two text controls, at run time the first one is still enabled (the condition failed) and the second disabled (condition succeeded).

Likewise, a silly way to detect if the target system is a Windows NT-based server of some sort might be to use MsiNTProductType><2.

And the other operators, << and >>, seem to be analogous to HIWORD and LOWORD from InstallScript; useful if you wanted to pull apart a language ID, perhaps?
0 Kudos
trevrobwhite
Level 4

Thanks for that your a star
0 Kudos