简体   繁体   中英

Remote registry read issue (server 2003, 2008 & 2008 R2)

We have a QA VBS script that has been working for quite some time. The impersonation level component was already in the script. There are several sections in the QA script that read the registry, remotely and locally, without error, across 2003, 2003x64, 2008 & 2008 R2.

I recently added a section for checking on the patch level of the SCOM agent. The script runs as intended locally, across all 3 OS's, but remotely, only Server 2003 (32-bit) can read this part of the registry, "HKLM\\SOFTWARE\\Classes\\Installer\\Products\\".

Here is the relevant section of code:

strKeyPath = "SOFTWARE\Classes\Installer\Products\07779052F1B26F94BAD9C107B86962A2\"
iRC = objReg.GetStringValue(HKLM, strKeyPath & "Patches", "772A5728AE0F5A548B3D4ACF8DB285ED", sValue)
If iRC = 0 Then
    sStatus2 = 1
End If

For debugging, I added an else section w/ Wscript.Echo iRC, which returned a 2. Per Net Helpmsg, the error is "The system cannot find the file specified.".

Is there some UAC voodoo at work? I can read other sections of the registry ("HKLM\\SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\" & "HKLM\\SOFTWARE\\Wow6432Node\\Network Associates\\ePolicy Orchestrator\\Application Plugins", to name a few) on S2K3x64, S2K8 and S2K8R2.

The problem seems to be isolated to my workstation. Other W7 systems don't have the same problem as this system.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM