Hi All
I've been trying to run a simple WMI script to read a value from registry path on HKEY_USERS (See below), . but haven't been able to get it to work on Windows 2000 SP4 machines for some reason (works OK on NT4 SP6a machines)...returnvalue/err.number I get is 2. Even trying to enumerate subkeys under HKEY_USERS I'm unable to do it (HKLM is fine), wondering if anyone else has seen this problem, if this is a bug or a functionality that has been taken away recently by Service Packs, hotfixes... or if there is anything wrong you can see with the script below.... any help is much appreciated. Thanks in Advance...
------------------------------------------------------------
Const HKEY_LOCAL_MACHINE = &H8000000
Const HKEY_USERS = &H80000003
CONST HKEY_CURRENT_USER = &H8000000
Set objreg = Getobject("winmgmts:{impersonationLevel=impersonate}!\\TESTPC\root\default:StdRegProv"
regpath = "S-1-5-21-1606980848-1965331169-1417001333-233556\Software\DFS\IRESS\File
retval = objreg.getstringvalue (HKEY_USERS,Regpath,"userdir", regvalue
wscript.echo "Retval is: " & retva
wscript.echo "regvalue: " & regvalu