Searching for a DWORD Value

(imported topic written by Efairrell91)

We have added a registry key on some computers to make their USB mass storage devices read only. We are wanting to search our computers for a value of this reg key. However, the value we want is a DWORD. I’ve seen how you search for a key of a key and a value of a key. But how would I search for the value of a DWORD for this:

KEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\StorageDevicePolicies Dword: WriteProtect

(imported comment written by jessewk)

You can get the value of a DWORD in the same way you would get the value of a REG_SZ

value “WriteProtect” of key “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\StorageDevicePolicies” of registry