(imported topic written by SystemAdmin)
We’ve got the following relevance below and are wondering if there is a more efficient way of writing said relevance? It’s looking at the current logged on user and checking to see if the BING search provider is defined and if so is it set as the default search provider. This all needs to happen in the current user context and since TEM has no way natively of doing this the we know of, we have to fake it out.
(exists key (
"HKEY_USERS\" & (string value of select (("SID from win32_useraccount where NAME=
'" & item 1 of it & "' and DOMAIN=
'" & item 0 of it & "'
") of (preceding text of first "\
" of it, following text of first "\
" of it) of (string values of selects "UserName from win32_computersystem
" of it)) of wmi) & "\Software\Microsoft\Internet Explorer\SearchScopes\
{0633EE93-D776-472f-A0FF-E1416B8B2E3A
}
") of native registry) AND ((exists value "DisplayName
" whose ("Bing
" != it) of key ("HKEY_USERS\
" & (string value of select (("SID from win32_useraccount where NAME=
'" & item 1 of it & "' and DOMAIN=
'" & item 0 of it & "'
") of (preceding text of first "\
" of it, following text of first "\
" of it) of (string values of selects "UserName from win32_computersystem
" of it)) of wmi) & "\Software\Microsoft\Internet Explorer\SearchScopes\
{0633EE93-D776-472f-A0FF-E1416B8B2E3A
}
") of native registry) AND (exists value "DefaultScope
" whose ("
{0633EE93-D776-472f-A0FF-E1416B8B2E3A
}
" != it) of key ("HKEY_USERS\
" & (string value of select (("SID from win32_useraccount where NAME=
'" & item 1 of it & "' and DOMAIN=
'" & item 0 of it & "'
") of (preceding text of first "\
" of it, following text of first "\
" of it) of (string values of selects "UserName from win32_computersystem
" of it)) of wmi) & "\Software\Microsoft\Internet Explorer\SearchScopes
") of native registry))