Notices
Computer & Technology Related Post here for help and discussion of computing and related technology. Internet, TVs, phones, consoles, computers, tablets and any other gadgets.

Batch file guru needed

Thread Tools
 
Search this Thread
 
Old 25 March 2003, 04:49 PM
  #1  
ozzy
Scooby Regular
Thread Starter
 
ozzy's Avatar
 
Join Date: Nov 1999
Location: Scotland, UK
Posts: 10,504
Likes: 0
Received 1 Like on 1 Post
Question

I need to create a batch command that will read a text file (list of computer names) and run a REG command for each of the computer names and pipe the output to a results file.

Basically, what I need is to capture the results of these two commands for every PC on our network.

REG QUERY "\\COMPUTER\HKLM\SOFTWARE\Network Associates\TVD\Shared Components\VirusScan Engine\4.0.xx" /v szDatVersion

REG QUERY "\\COMPUTER\HKLM\SOFTWARE\Network Associates\TVD\Shared Components\VirusScan Engine\4.0.xx" /v szEngineVer

I'd like the output to be in the format <NAME> <DAT> <ENGINE>, like this:-

COMPUTER1 4214 1254
COMPUTER2 4221 1236
COMPUTER3 7823 9685
and so on .........

Stefan
Old 26 March 2003, 11:51 AM
  #2  
ozzy
Scooby Regular
Thread Starter
 
ozzy's Avatar
 
Join Date: Nov 1999
Location: Scotland, UK
Posts: 10,504
Likes: 0
Received 1 Like on 1 Post
Unhappy

ne1
Old 26 March 2003, 12:08 PM
  #3  
workshy_fopp
Scooby Regular
 
workshy_fopp's Avatar
 
Join Date: Jan 2003
Posts: 757
Likes: 0
Received 0 Likes on 0 Posts
Post

You need to do something with a FOR command e.g.

for /F %1 in (****.txt) do spver.bat %1 >> splist.txt

------------

and spver.bat would be your reg query e.g.

reg query "HKLM\software\microsoft\Windows NT\currentversion\csdversion" %1
Old 26 March 2003, 12:09 PM
  #4  
ozzy
Scooby Regular
Thread Starter
 
ozzy's Avatar
 
Join Date: Nov 1999
Location: Scotland, UK
Posts: 10,504
Likes: 0
Received 1 Like on 1 Post
Thumbs up

Thanks m8, I'll give that a try.
Old 26 March 2003, 12:15 PM
  #5  
Jodster
Scooby Regular
 
Jodster's Avatar
 
Join Date: Dec 2001
Location: Sutton, Surrey
Posts: 536
Likes: 0
Received 0 Likes on 0 Posts
Post

I'll take a stab at it.


for /F %%p in (pclist.txt) do (
ECHO.%%p >> output.log
REG QUERY "\\HKLM\SOFTWARE\Network Associates\TVD\Shared Components\VirusScan Engine\4.0.xx" /v szDatVersion \\%%p >> output.txt
REG QUERY "\\HKLM\SOFTWARE\Network Associates\TVD\Shared Components\VirusScan Engine\4.0.xx" /v szEngineVer \\%%p >> output.txt
)

place this .bat in a folder with a text file with your machine names called pclist.txt and the reg.exe. Not sure the output format will be what you want though.

I use a similar script to update registry winlogon entries to groups of machines.

[Edited by Jodster - 3/26/2003 12:18:07 PM]
Old 26 March 2003, 12:17 PM
  #6  
David_Wallis
Scooby Regular
 
David_Wallis's Avatar
 
Join Date: Nov 2001
Location: Leeds - It was 562.4bhp@28psi on Optimax, How much closer to 600 with race fuel and a bigger turbo?
Posts: 15,239
Likes: 0
Received 1 Like on 1 Post
Post

why not just use kix login scripts to log the information to a file stored on a server??

Then if the version was different to the version on another share you could run an update..

David
Old 26 March 2003, 12:22 PM
  #7  
ozzy
Scooby Regular
Thread Starter
 
ozzy's Avatar
 
Join Date: Nov 1999
Location: Scotland, UK
Posts: 10,504
Likes: 0
Received 1 Like on 1 Post
Post

The client workstations are all configured to run an automatic DAT update. The problem is the engine doesn't get automatically updated by the NAI console.

I'll have a look at the Kix stuff to see if it's a better method of identifying who's up-to-date and who isn't. From doing some spot checks it looks like all the NAI 4.5.1 clients are updating properly, but the Vscan 6 & 7 clients aren't.

Just want to run some reports to identify where the problem clients are.

Keep the ideas coming lads,

Stefan

Trending Topics

Old 26 March 2003, 12:30 PM
  #8  
WillieF
Scooby Regular
 
WillieF's Avatar
 
Join Date: Oct 1999
Posts: 778
Likes: 0
Received 0 Likes on 0 Posts
Post

Jack Clark where are you...

Ozzy sounds like a job for ePolicy Orchestrator which comes as part of AVD from NAI...

Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
taylor85
Wanted
2
13 September 2015 04:57 PM
AzzDSM
Engine Management and ECU Remapping
4
13 September 2015 03:59 PM
robbie1988
Wanted
2
13 September 2015 09:25 AM
riiidaa
ScoobyNet General
1
12 September 2015 11:52 AM
Scooby-Doo 2
Wheels And Tyres For Sale
1
09 September 2015 06:51 PM



Quick Reply: Batch file guru needed



All times are GMT +1. The time now is 01:40 AM.