Hey BigFixers, Can one of you help me to create this relevance…
Q: (exists key “HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Edge\AutoSelectCertificateForUrls” whose (exists values whose (name of it = “1” AND it as string as lowercase = “{{“pattern”:”[*.]google.com",“filter”:{{“ISSUER”:{{“CN”:“DM User CA”,“OU”:“Certification Authorities”},“SUBJECT”:{{“OU”: “Directory Users”}}}" as lowercase) of it) of native registry)
E: This expression contained a character which is not allowed.
Ah, I see…your longer string contains embedded literal doublequotes. You need to replace those doublequotes with their percent-encoding value - %22 represents a literal doublequote in a string
Q: (exists key "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Edge\AutoSelectCertificateForUrls" whose (exists values whose (name of it = "1" AND it as string as lowercase = "{%22pattern%22:%22[*.]google.com%22,%22filter%22:{%22ISSUER%22:{%22CN%22:%22DM User CA%22,%22OU%22:%22Certification Authorities%22},%22SUBJECT%22:{%22OU%22: %22Directory Users%22}" as lowercase) of it) of native registry)
A: False
T: 1287
Additionally, since you have literal open-curly and close-curly brackets { } , if you use this inside of a relevance substitution in ActionScript you would need to escape the close-curly-brackets by doubling them up to prevent ending the substitution early
if {(exists key "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Edge\AutoSelectCertificateForUrls" whose (exists values whose (name of it = "1" AND it as string as lowercase = "{%22pattern%22:%22[*.]google.com%22,%22filter%22:{%22ISSUER%22:{%22CN%22:%22DM User CA%22,%22OU%22:%22Certification Authorities%22}},%22SUBJECT%22:{%22OU%22: %22Directory Users%22}}" as lowercase) of it) of native registry)}
//do something
endif
Q: (exists key “HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Edge\AutoSelectCertificateForUrls” whose (exists values whose (name of it = “1” AND it as string as lowercase = “{"pattern":"[*.]google.com","filter":{"ISSUER":{"CN":"DM User CA","OU":"Certification Authorities"},"SUBJECT":{"OU": "Directory Users"}}}” as lowercase) of it) of native registry)
Q: (exists key "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Edge\AutoSelectCertificateForUrls" whose (exists values whose (name of it = "1" AND it as string as lowercase = "{{\"pattern\":\"[*.]google.com\",\"filter\":{{\"ISSUER\":{{\"CN\":\"DM User CA\",\"OU\":\"Certification Authorities\"},\"SUBJECT\":{{\"OU\": \"Directory Users\"}}}" as lowercase) of it) of native registry)
E: This expression contained a character which is not allowed.
You would see where the expression formatting is not right in the FixletDebugger, which as @JasonWalker suggests is due to the quotes that you need to use % encoding for .
Q: (exists key "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Edge\AutoSelectCertificateForUrls" whose (exists values whose (name of it = "1" AND it as string as lowercase = "{{%22pattern%22:%22[*.]google.com%22,%22filter%22:{{%22ISSUER%22:{{%22CN%22:%22DM User CA%22,%22OU%22:%22Certification Authorities%22},%22SUBJECT%22:{{%22OU%22: %22Directory Users%22}}}" as lowercase) of it) of native registry)
Thanks @JasonWalker, @SLB, @brolly33 for the help and support. Relevance created and working as expected after replacing literal doublequotes in the string with %22.
Here is the correct relevance.
After replacing literal doublequotes in the string with %22 issue got resolved.
Q:(exists keys "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Edge\AutoSelectCertificateForUrls" whose (exists values whose(name of it = "1" AND it as string as lowercase = "%22{\%22pattern\%22:\%22[*.]google.com\%22,\%22filter\%22:{\%22ISSUER\%22:{\%22CN\%22:\%22DM User CA\%22,\%22OU\%22:\%22Certification Authorities\%22},\%22SUBJECT\%22:{\%22OU\%22: \%22Directory Users\%22}}}%22" as lowercase ) of it) of registry)
A: True
T: 0.542 ms
I: singular boolean
Subjected issue has been resolved but when I’m trying to push registry then backslash getting removed from registry. Can you please guide me little more, what am I missing?
Take a correctly-configured Registry value and export it to a file to see how it literally looks in a .reg file.
The backslashes will be doubled, I’m not sure whether anything else also gets escaped.
In Action script you’ll also need to double the { characters. The {{ will appear as a relevance-escaped single {, so to get two {{ symbols literally you’ll need {{{{