Vbscript StdRegProv类的GetDWORDValue方法;路径“;
你好,我有一个小问题,我想读出下面的注册表项 “hklm\Software\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto 更新\“Vbscript StdRegProv类的GetDWORDValue方法;路径“;,vbscript,registry,64-bit,windows-installer,Vbscript,Registry,64 Bit,Windows Installer,你好,我有一个小问题,我想读出下面的注册表项 “hklm\Software\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto 更新\“ 我用微软的例子来尝试: const HKEY_LOCAL_MACHINE = &H80000002 strComputer = "." Set StdOut = WScript.StdOut Set oReg=GetObject( _ "winmgmts:{impersonationLevel=imp
const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set StdOut = WScript.StdOut
Set oReg=GetObject( _
"winmgmts:{impersonationLevel=impersonate}!\\" &_
strComputer & "\root\default:StdRegProv")
strKeyPath = "SYSTEM\CurrentControlSet\Control\CrashControl"
strValueName = "AutoReboot"
oReg.GetDWORDValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue
WScript.Echo "SYSTEM\CurrentControlSet\Control\" _
& "CrashControl\AutoReboot" _
& " = " & dwValue
const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set StdOut = WScript.StdOut
Set oReg=GetObject( _
"winmgmts:{impersonationLevel=impersonate}!\\" &_
strComputer & "\root\default:StdRegProv")
strKeyPath = "Software\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\"
strValueName = "AUOptions"
oReg.GetDWORDValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue
WScript.Echo "AUOptions: " &dwValue
信息:操作系统Win7 x64这是一个困难的方法。即使你不说你在做什么。这里有一个例子
Set Sh = WScript.CreateObject("WScript.Shell")
strNamet1=Sh.RegRead("HKLM\Software\Microsoft\Windows\CurrentVersion\RegisteredOwner")
好的,我需要一个vbs文件,用于另一个从注册表项读取winupdate状态的应用程序,并生成一个xml文件(“HKLM\Software\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\AUoptions”),我尝试通过以下示例读取此注册表项:Set Sh=WScript.CreateObject(“WScript.Shell”)strNamet1=Sh.Regrad(“HKLM\Software\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\AUoptions”)WScript.Echo“&strNamet1&”输出为空:(计算WMI方法的返回代码(
rc=oReg.GetDWORDValue(HKEY\u LOCAL\u MACHINE,strKeyPath,strValueName,dwValue)
)。运行该语句后,变量rc
的值是多少?此Windows Installer与此有何关系?