‘following is some scripts I made to read the registry, get the information of Flash player version, (start from there you can put like JRE version or what else in to get the requred information. For me at the moment Flash Player and JRE are very important for my school to get kids on internet and use some educational Flash or Javascripts. So I have to make this to gather information like which workstation has no requried software and fix them.

The other part not mentioned here is a web page to load database. I created a asp.net(VB) webpage to read the whole table into a datagrid, because it is gonna be too long to cover all of them here, I should discuss that part later. However, if you take sometime to learn how to use visual studio web designer/datagrid/data control/ datagrid template, it will be really easy to make. I spend 1/2 day to learn those and it take me 5 minutes to make a webpage show all the data with most userful search/sorting functions, and it is not really ugly.

there are reference if you google how to use vbs to read registry or link to sql database. The key is a combination. The osversion is important because in 64 bit OS, the registry of some applications are not always in same area of 32bit. it take me a while to compare the registry change and find it out. and if you read the vbs code you will learn the difference. Cheers.

dim osversion,versionvalue,flashexist
 On Error Resume Next

Const wbemFlagReturnImmediately = &h10
Const wbemFlagForwardOnly = &h20
const HKEY_LOCAL_MACHINE = &H80000002

Set objWMIService = GetObject(“winmgmts:\\.\root\CIMV2”)
Set colItems = objWMIService.ExecQuery(“SELECT * FROM Win32_Processor”, “WQL”, _
                                          wbemFlagReturnImmediately + wbemFlagForwardOnly)
For Each objItem In colItems
osversion= objItem.AddressWidth
strComputer = “.”
Set oReg=GetObject(“winmgmts:{impersonationLevel=impersonate}!\\” &_
strComputer & “\root\default:StdRegProv”)

‘from here you can see, 32bit and 64bit has different registry location.

Set WshShell = WScript.CreateObject(“WScript.Shell”)if osversion=”32″ then
strKeyPath = “SOFTWARE\Macromedia\FlashPlayerActiveX”
strKeyPath = “SOFTWARE\Wow6432Node\Macromedia\FlashPlayerActiveX”
end if
strValueName = “Version”

‘I spend sometime here to find out Flash_Version is a binary string,

‘ the method to read binary string is different from others, if you use wrong ‘method to read registry, most likely you get blank. Be careful.

oReg.GetExpandedStringValue HKEY_LOCAL_MACHINE,strKeyPath,_
 wscript.echo  “Current flash player version is : ” & Flash_Version

‘we had Flash_version, now just need insert/update it into the table.

Dim sServer,sLogin,sPwd,oCn,oRs,Wl,sql
sServer = “<servername>”
sLogin = “<Username>”
sPwd = “<password>”

Set oCn = CreateObject( “ADODB.Connection” )
Set oRs = CreateObject( “ADODB.Recordset”  )

oCn.ConnectionString = “PROVIDER=SQLOLEDB” & _
                       “;SERVER=” & sServer   & _
                       “;UID=”    & sLogin  & _
                       “;PWD=”    & sPwd    & _
sql= “Select Host_Name from <tableName> where Host_Name = ‘”& WshShell.expandenvironmentstrings(“%COMPUTERNAME%”) & “‘”
oRs.Open sql, oCn
If Not oRs.EOF then
‘ see shall we use insert or use update.
  strQuery = “update <tableName> set flash_player='”&Flash_Version&”‘ where host_name='”& WshShell.expandenvironmentstrings(“%COMPUTERNAME%”)& “‘”
 strQuery = “INSERT INTO  bscpcs (flash_player, Host_Name) VALUES (‘”&Flash_Version&”‘, ‘”& WshShell.expandenvironmentstrings(“%COMPUTERNAME%”)& “‘)”
end If
msgbox strQuery


Hopefully this helpful. Ask your question and I will try to help.