|
Post by davidk on Sept 10, 2019 20:58:49 GMT
I'm trying to come up with a Preflight for TPM where it will only pass if a present TPM is Enabled and Active (but will also pass if there is no TPM at all). My XML isn't the best in the world and using And / Or in the same cluase gets confusing (for me) in any language. In "DOS-ish" terms this would be along the lines of: If [XTPMAvailable]=True AND ([XTPMEnabled]=False OR [XTPMActivated]=False) then fail
I've tried several different iterations and just can't get it to work. Any hints or suggestions?
|
|
|
Post by Jason on Sept 13, 2019 15:57:44 GMT
Should be something like this:
CheckCondition='"%XTPMAvailable%" = "True" And ("%XTPMEnabled%" = "True" Or "%XTPMActivated%" = "True")'
To reference the value of a variable, surround the variable's name in %.
Because Conditions are evaluated using VBScript, doing a string comparison here is best. Surround the values with double-quotes tells VBScript to treat them as strings and thus it will perform a string comparison.
Finally, use single quotes for the CheckCondition attribute's value since the value contains double-quotes.
|
|
|
Post by davidk on Sept 13, 2019 16:02:14 GMT
Thaank you sir. I think I did try that, but I will retest and post results.
|
|
|
Post by davidk on Sept 13, 2019 17:11:54 GMT
OK, I must have had the syntax wrong before - that does work, but doesn't give the result I want. Which is a logic fail on my part. Thanks for the excellent tool and the assistance.
|
|
|
Post by Jason on Sept 16, 2019 2:47:55 GMT
You're welcome and thank you!
|
|