Values of Keys of key of registry

(imported topic written by SystemAdmin)

Im trying to get the values of SNMP registry keys

(values of keys of key “HKEY_LOCAL_MACHINE\SOFTWARE\Policies\SNMP\Parameters\ValidCommunities” of registry as string)

doesn’t work…

the values are like below, they can have any number of values

HKEY_LOCAL_MACHINE\SOFTWARE\Policies\SNMP\Parameters\PermittedManagers

“1”=“localhost”

“2”=“server01.domain.com

“3”=“server01.domain.com

“4”=“server01.domain.com

i’m looking to return something like below

“1”=“localhost”, “2”=“server01.domain.com”, “3”=“server01.domain.com”, “4”=“server01.domain.com

(imported comment written by SystemAdmin)

Ok, I don’t know exactly which registry key you mean (you specified two).

Depending if you want the double quotes or not, try either…

concatenation “,” of ("%22" & name of it & “%22=%22” & it as string & “%22”) of values of key “HKEY_LOCAL_MACHINE\SOFTWARE\Policies\SNMP\Parameters\PermittedManagers” of registry

or

concatenation “,” of (name of it & “=” & it as string) of values of key “HKEY_LOCAL_MACHINE\SOFTWARE\Policies\SNMP\Parameters\PermittedManagers” of registry

-Paul