November 03, 2007

WMI & Registry

用來查詢Registry的值。
參考自MSDN

Sub Initialize
Dim oReg As Variant

Const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv")
strKeyPath = "Software\Microsoft\DataAccess"
strValueName = "FullInstallVer"
oReg.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue
Msgbox "Version: " & dwValue
End Sub

WMI Registry LotusScript
Posted by philipz at November 3, 2007 01:21 AM
歷史上的今天
Comments
Post a comment













Remember personal info?