Hi All,
I took a look at the Excel FAQ which has been very helpful for past projects. However, i've not been able to figure out how to get this script to work. I'm trying to read from Excel and then write the registry values to each Column in the spreadsheet. Any help would be appreciated.
Const HKEY_CURRENT_USER = &H80000001
Const HKEY_LOCAL_MACHINE = &H80000002
on error resume next
set x = getobject(,"excel.application")
r = 2
do until len(x.cells(r, 1).value) = 0
strComputer = x.cells(r, 1).Value
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _
strComputer & "\root\default:StdRegProv")
strKeyPath = "SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{2244BE80-C7C9-4A5A-9AB5-22B0A72D28F8}"
strValueName = "DisplayVersion"
oReg.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
Wscript.Echo "MPIO Version FF DSM: " & strValue
strKeyPath = "SOFTWARE\Cisco Systems\VPN Client"
strValueName = "INSTALLTYPE"
oReg.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
Wscript.Echo "INSTALLTYPE: " & strValue
I took a look at the Excel FAQ which has been very helpful for past projects. However, i've not been able to figure out how to get this script to work. I'm trying to read from Excel and then write the registry values to each Column in the spreadsheet. Any help would be appreciated.
Const HKEY_CURRENT_USER = &H80000001
Const HKEY_LOCAL_MACHINE = &H80000002
on error resume next
set x = getobject(,"excel.application")
r = 2
do until len(x.cells(r, 1).value) = 0
strComputer = x.cells(r, 1).Value
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _
strComputer & "\root\default:StdRegProv")
strKeyPath = "SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{2244BE80-C7C9-4A5A-9AB5-22B0A72D28F8}"
strValueName = "DisplayVersion"
oReg.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
Wscript.Echo "MPIO Version FF DSM: " & strValue
strKeyPath = "SOFTWARE\Cisco Systems\VPN Client"
strValueName = "INSTALLTYPE"
oReg.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
Wscript.Echo "INSTALLTYPE: " & strValue