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

February 2012

Sun Mon Tue Wed Thu Fri Sat
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29      

Archives

Powered by Movable Type 4.34-en

About this Entry

This page contains a single entry by philipz published on November 3, 2007 1:21 AM.

在 Windows 終端伺服器環境中安裝 Office 2000 was the previous entry in this blog.

AOP 介绍 is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.