strLog = Replace(Wscript.ScriptFullname,Wscript.Scriptname,"")&"GetDrivers.log"
set FSO = CreateObject("Scripting.Filesystemobject")
set Logs = FSO.createTextFile(strLog)
Const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set objRegistry = GetObject("winmgmts:\\" & strComputer & "\root\default:StdRegProv")
strKeyPath = "SOFTWARE\ODBC\ODBCINST.INI\ODBC Drivers"
objRegistry.EnumValues HKEY_LOCAL_MACHINE, strKeyPath, arrValueNames, arrValueTypes
For i = 0 to UBound(arrValueNames)
strValueName = arrValueNames(i)
objRegistry.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
Logs.writeline arrValueNames(i) & " -- " & strValue
Next
Logs.close
set Logs = Nothing
set FSO = Nothing
set objRegistry = Nothing
Monday, November 9, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment