Yup,
Looks good once I uncommented the echoes:
Tested with:
[code]
'
'''''''''''''''''''''''''''
'ODBC Connections '
'''''''''''''''''''''''''''
if ((ServicePack = "2" AND SystemBuildNumber = "2600") OR (SystemBuildNumber = "3790" AND ServicePack = "1" OR ServicePack = "2") OR (SystemBuildNumber = "6000")) then
comment = "ODBC Connections"
if verbose = "y" then
wscript.echo comment
end if
On Error Resume Next
strKeyPath = "SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources"
oReg.EnumValues HKEY_LOCAL_MACHINE,strKeyPath,arrSubKeys
For Each subkey In arrSubKeys
comment = subkey
wscript.echo "Name: " & comment
odbc_name = subkey
strKeyPath1 = "SOFTWARE\ODBC\ODBC.INI\" & subkey
comment = strKeyPath1
wscript.echo comment
oReg.EnumValues HKEY_LOCAL_MACHINE, strKeyPath1, arrValueNames, arrValueTypes
For i=0 To UBound(arrValueNames)
oReg.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath1,_
arrValueNames(i),strValue
wscript.echo arrValueNames(i) & ": " & strValue
Next
Next
end if
[/code]
Results:
[code]
ODBC Connections
Name: VisNeticGroupWare
SOFTWARE\ODBC\ODBC.INI\VisNeticGroupWare
Driver: C:\WINNT\System32\odbcjt32.dll
DBQ: C:\Program Files\Deerfield.com\VisNetic MailServer\calendar\Calendar.mdb
DriverId:
FIL: MS Access
SafeTransactions:
UID:
Name: VisNeticChallenge
SOFTWARE\ODBC\ODBC.INI\VisNeticChallenge
Driver: C:\WINNT\System32\odbcjt32.dll
DBQ: C:\Program Files\Deerfield.com\VisNetic MailServer\spam\Challenge.mdb
DriverId:
FIL: MS Access
SafeTransactions:
UID:
Name: PRODADSD
SOFTWARE\ODBC\ODBC.INI\PRODADSD
Database: PRODADSD
Driver: C:\WINDOWS\system32\SQLSRV32.dll
Server: PVD10
Trusted_Connection: Yes
Name: PRODAITM
SOFTWARE\ODBC\ODBC.INI\PRODAITM
[/code]
One thing we can do is expand this line:
[code]
if ((ServicePack = "2" AND SystemBuildNumber = "2600") OR (SystemBuildNumber = "3790" AND ServicePack = "1" OR ServicePack = "2") OR (SystemBuildNumber = "6000")) then
[/code]
To include Win 2000 and higher systems.
Next step pls
thanks,
Jason