This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Suite-Project - Registry Comparison condition - Empty string
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 26, 2015
03:34 PM
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 🙂
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 🙂
(3) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 28, 2015
08:57 AM
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?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 28, 2015
02:57 PM
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:
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.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 29, 2015
08:21 AM
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].
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].
![](/skins/images/A5EADE085F77DE82FB3B14D6B307AE6A/responsive_peak/images/icon_anonymous_message.png)