PC Review


Reply
Thread Tools Rate Thread

reading software version from registry

 
 
james
Guest
Posts: n/a
 
      3rd Nov 2003
I would like to read the MacAfee software version stored in the registry
(string data) from the loginscript and append the result to a file. This
entry is in :

HKEY_LOCAL_MACHINE\SOFTWARE\Network Associates\TVD\VirusScan

The string value name is szCurrentVersionNumber & what I am looking for is
the string value data. It is this data that I went to dump into a file when
the user logs in (something like 4.5.1.1306).

Thanks


 
Reply With Quote
 
 
 
 
Dave Patrick
Guest
Posts: n/a
 
      4th Nov 2003
This VBScript should work. Watch for line wrap.

Dim WshShell
Set WshShell = WScript.CreateObject("WScript.Shell")

WScript.Echo WshShell.RegRead("HKLM\SOFTWARE\Network
Associates\TVD\VirusScan\szCurrentVersionNumber")

--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft MVP [Windows NT/2000 Operating Systems]

"james" wrote:
> I would like to read the MacAfee software version stored in the registry
> (string data) from the loginscript and append the result to a file. This
> entry is in :
>
> HKEY_LOCAL_MACHINE\SOFTWARE\Network Associates\TVD\VirusScan
>
> The string value name is szCurrentVersionNumber & what I am looking for is
> the string value data. It is this data that I went to dump into a file

when
> the user logs in (something like 4.5.1.1306).
>
> Thanks
>
>



 
Reply With Quote
 
Dave Patrick
Guest
Posts: n/a
 
      4th Nov 2003
This VBScript should work. Watch for line wrap.

Dim WshShell
Set WshShell = WScript.CreateObject("WScript.Shell")

WScript.Echo WshShell.RegRead("HKLM\SOFTWARE\Network
Associates\TVD\VirusScan\szCurrentVersionNumber")

--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft MVP [Windows NT/2000 Operating Systems]

"james" wrote:
> I would like to read the MacAfee software version stored in the registry
> (string data) from the loginscript and append the result to a file. This
> entry is in :
>
> HKEY_LOCAL_MACHINE\SOFTWARE\Network Associates\TVD\VirusScan
>
> The string value name is szCurrentVersionNumber & what I am looking for is
> the string value data. It is this data that I went to dump into a file

when
> the user logs in (something like 4.5.1.1306).
>
> Thanks
>
>



 
Reply With Quote
 
Mark V
Guest
Posts: n/a
 
      4th Nov 2003
In microsoft.public.win2000.registry Dave Patrick wrote:

> This VBScript should work. Watch for line wrap.
>
> Dim WshShell
> Set WshShell = WScript.CreateObject("WScript.Shell")
>
> WScript.Echo WshShell.RegRead("HKLM\SOFTWARE\Network
> Associates\TVD\VirusScan\szCurrentVersionNumber")
>

OP,
If you have disabled scripting you might make a batch solution using
REG.EXE (from the Support Tools) or possibly using psinfo.exe from
www.sysyinternals.com. I have no such software to test these ideas
though.
 
Reply With Quote
 
Mark V
Guest
Posts: n/a
 
      4th Nov 2003
In microsoft.public.win2000.registry Dave Patrick wrote:

> This VBScript should work. Watch for line wrap.
>
> Dim WshShell
> Set WshShell = WScript.CreateObject("WScript.Shell")
>
> WScript.Echo WshShell.RegRead("HKLM\SOFTWARE\Network
> Associates\TVD\VirusScan\szCurrentVersionNumber")
>

OP,
If you have disabled scripting you might make a batch solution using
REG.EXE (from the Support Tools) or possibly using psinfo.exe from
www.sysyinternals.com. I have no such software to test these ideas
though.
 
Reply With Quote
 
james
Guest
Posts: n/a
 
      4th Nov 2003
Thank you both for your response. I tried all the solutions you provided &
all work. I still have one question. In the vbscript below, how can I dump
the output into a variable? That is, instead of echoing the output to the
screen, I save it to a variable ? Thanks


"Mark V" <(E-Mail Removed)> wrote in message
news:Xns9429493F368E4z9zzaQ2btw@207.46.248.16...
> In microsoft.public.win2000.registry Dave Patrick wrote:
>
> > This VBScript should work. Watch for line wrap.
> >
> > Dim WshShell
> > Set WshShell = WScript.CreateObject("WScript.Shell")
> >
> > WScript.Echo WshShell.RegRead("HKLM\SOFTWARE\Network
> > Associates\TVD\VirusScan\szCurrentVersionNumber")
> >

> OP,
> If you have disabled scripting you might make a batch solution using
> REG.EXE (from the Support Tools) or possibly using psinfo.exe from
> www.sysyinternals.com. I have no such software to test these ideas
> though.



 
Reply With Quote
 
james
Guest
Posts: n/a
 
      4th Nov 2003
Thank you both for your response. I tried all the solutions you provided &
all work. I still have one question. In the vbscript below, how can I dump
the output into a variable? That is, instead of echoing the output to the
screen, I save it to a variable ? Thanks


"Mark V" <(E-Mail Removed)> wrote in message
news:Xns9429493F368E4z9zzaQ2btw@207.46.248.16...
> In microsoft.public.win2000.registry Dave Patrick wrote:
>
> > This VBScript should work. Watch for line wrap.
> >
> > Dim WshShell
> > Set WshShell = WScript.CreateObject("WScript.Shell")
> >
> > WScript.Echo WshShell.RegRead("HKLM\SOFTWARE\Network
> > Associates\TVD\VirusScan\szCurrentVersionNumber")
> >

> OP,
> If you have disabled scripting you might make a batch solution using
> REG.EXE (from the Support Tools) or possibly using psinfo.exe from
> www.sysyinternals.com. I have no such software to test these ideas
> though.



 
Reply With Quote
 
Torgeir Bakken (MVP)
Guest
Posts: n/a
 
      4th Nov 2003
james wrote:

> Thank you both for your response. I tried all the solutions you provided &
> all work. I still have one question. In the vbscript below, how can I dump
> the output into a variable? That is, instead of echoing the output to the
> screen, I save it to a variable ? Thanks


Hi

Set WshShell = CreateObject("WScript.Shell")

sVer = WshShell.RegRead _
("HKLM\SOFTWARE\Network Associates\TVD\VirusScan\szCurrentVersionNumber")

' echo the variable:
WScript.Echo sVer


--
torgeir
Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of the 1328 page
Scripting Guide: http://www.microsoft.com/technet/scriptcenter


 
Reply With Quote
 
 
 
 
Torgeir Bakken (MVP)
Guest
Posts: n/a
 
      4th Nov 2003
james wrote:

> Thank you both for your response. I tried all the solutions you provided &
> all work. I still have one question. In the vbscript below, how can I dump
> the output into a variable? That is, instead of echoing the output to the
> screen, I save it to a variable ? Thanks


Hi

Set WshShell = CreateObject("WScript.Shell")

sVer = WshShell.RegRead _
("HKLM\SOFTWARE\Network Associates\TVD\VirusScan\szCurrentVersionNumber")

' echo the variable:
WScript.Echo sVer


--
torgeir
Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of the 1328 page
Scripting Guide: http://www.microsoft.com/technet/scriptcenter


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows Registry Cleaner - Download Free Registry Software voujnbwuotkd@yahoo.com Windows XP General 18 27th Jul 2008 05:32 PM
How to programmatically read registry for installation and version of 3 specific software apps Phillip Windows XP Configuration 1 28th Sep 2005 08:13 PM
Reading registry key throws "Requested registry access is not allowed." HK Microsoft ASP .NET 1 1st Apr 2004 06:44 PM
reading software version from registry james Microsoft Windows 2000 Registry 4 4th Nov 2003 10:21 PM
reading software version from registry james Microsoft Windows 2000 Registry Archive 0 3rd Nov 2003 09:59 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:55 PM.