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

Suite-Project - Registry Comparison condition - Empty string

[IS 2014, project type Suite/Advanced UI]

Hi,

I'm trying to create a registry comparison that checks that a certain string value under HKLM\Software\... is not empty.
(The comparison serves as a detection-condition for feature X.)
PROBLEM: It is obviously not allowed to leave the "Compare To" field empty. The error is simply something like "please enter a value to be compared to".

Operator: Any
Condition Check: Registry Comparison
Registry Key: HKLM\Software\...
Value name:
Conversion: String
Comparison: not equal
Compare To: should remain empty ...

Is there a trick I'm missing?
Any help will be greatly appreciated 🙂
Labels (1)
0 Kudos
(3) Replies
MichaelU
Level 12 Flexeran
Level 12 Flexeran

If you're merely looking to see if the key or value exists, prefer to use the Registry Exists condition. If you explicitly need to ensure that it exists and has a non-empty string for its value data, I think this may be a limitation in the current condition implementation. While the warning in the condition editor can be ignored, there's a run-time error if the Compare To value is empty. Is that run-time error what you're asking to address? In your ideal world, are you strictly looking for non-empty, or are there additional aspects to the value data that you would prefer to validate?
0 Kudos
hviolet
Level 4

Thank you MichaelU for the reply,

Yes I meant exactly that run-time error you mentioned.
I have found a workaround that allows checking for empty/non-empty Registry-String-values:
Compare to:

, where P is a property with empty value - that works.

0 Kudos
MichaelU
Level 12 Flexeran
Level 12 Flexeran

Ah, great workaround. I should have thought of that. 🙂

Note that you don't have to explicitly define the property for it to be empty, and in some ways using a crazy mix of letters in its name may help avoid it being accidentally overridden by an end user. That said, I'd probably go for something easy to understand, like [EmptyString].
0 Kudos