> Alright I know this is off topic, though it could be a little 
> on topic showing how verbose VBScript can be. I want to make a 
> VBS up so that it will check to see what version of virus scanner 
> software I have an execute the appropiate updates once it has it. 
> Does anyone know how to access the registry with VBS or already 
> has a working example of this?

It's very easy to do this, so I threw together an example:

' regreaddemo.vbs
Option Explicit

Dim oShell
Dim strKey
Dim strCurrentVersion

Set oShell = CreateObject("WScript.Shell")
strKey = "HKLM\Software\Allaire\Spectra\CurrentVersion"
strCurrentVersion = oShell.RegRead(strKey & "\Version")

MsgBox "Spectra Version: " & strCurrentVersion
' end regreaddemo.vbs

To run this example, you'll need to have Spectra installed, and type
"cscript regreaddemo.vbs" at the command line.

You'd have to know the appropriate registry key and value, of course, and
you'd want to add code to actually get the update and install it as well,
probably. Some virus scanner applications provide this functionality
automatically, as well.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to