This is usually done using two queries with the same property: one search for HKLM and the other for HKCU.
The following scenarios are possible:
- the first search finds the value and sets the property; in this case, the second search result is ignored, since its property is already set by the first search
- the second search will find the value and set the property
- both searches find nothing and the property is empty
Cosmin pirvu
source share