(imported topic written by sinucus)
I’m writing some relevance and I finally got a working version of it but I feel that it is terrible code and I’m looking for some help understanding a better way to write this code.
if (exists key whose (name of it contains “for_KB2779768”) of key “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\ApplicabilityEvaluationCache” of native registry) then if (exists (value “ApplicabilityState” of key whose (name of it contains “for_KB2779768”) of key “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\ApplicabilityEvaluationCache” of native registry)) then value “ApplicabilityState” of key whose (name of it contains “for_KB2779768”) of key “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\ApplicabilityEvaluationCache” of native registry != 80 else true else false
What I’m looking for is to search for a registry key, check to see if it has a value and then checking the data of it. The problem that I kept running into was with the “name of it ‘contains’” section. When the key didn’t exist, the whole relevance broke.
Thanks in advance