Reputation: 63415
I have the following values in my registry
key:
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Accepted Documents\
values:
* -> application/msword
** -> application/vnd.ms-excel
*** -> application/vnd.ms-powerpoint
and so on
I'd like to know how to read all of them
with Wscript.Shell
, RegRead
I can only read one value, but I don't know the values in advance...
Upvotes: 3
Views: 15223
Reputation: 63415
Well, I got it
I had to use wmi, like this:
option explicit
const HKLM = &H80000002
dim keyPath
keyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Accepted Documents"
dim reg
dim valueNames, types
dim value
dim i
set reg = getObject( "Winmgmts:root\default:StdRegProv" )
if reg.enumValues( HKLM, keyPath, valueNames, types ) = 0 then
if isArray( valueNames ) then
for i = 0 to UBound( valueNames )
reg.getStringValue HKLM, keyPath, valueNames(i), value
msgBox( valueNames(i) & "=" & value )
next
end if
end if
saludos
sas
Upvotes: 5