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 Mar 25, 2003 | 04:49 PM
  #1  
ozzy's Avatar
ozzy
Thread Starter
Scooby Regular
 
Joined: Nov 1999
Posts: 10,504
Likes: 1
From: Scotland, UK
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
Reply
Old Mar 26, 2003 | 11:51 AM
  #2  
ozzy's Avatar
ozzy
Thread Starter
Scooby Regular
 
Joined: Nov 1999
Posts: 10,504
Likes: 1
From: Scotland, UK
Unhappy

ne1
Reply
Old Mar 26, 2003 | 12:08 PM
  #3  
workshy_fopp's Avatar
workshy_fopp
Scooby Regular
 
Joined: Jan 2003
Posts: 757
Likes: 0
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
Reply
Old Mar 26, 2003 | 12:09 PM
  #4  
ozzy's Avatar
ozzy
Thread Starter
Scooby Regular
 
Joined: Nov 1999
Posts: 10,504
Likes: 1
From: Scotland, UK
Thumbs up

Thanks m8, I'll give that a try.
Reply
Old Mar 26, 2003 | 12:15 PM
  #5  
Jodster's Avatar
Jodster
Scooby Regular
 
Joined: Dec 2001
Posts: 536
Likes: 0
From: Sutton, Surrey
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]
Reply
Old Mar 26, 2003 | 12:17 PM
  #6  
David_Wallis's Avatar
David_Wallis
Scooby Regular
 
Joined: Nov 2001
Posts: 15,239
Likes: 1
From: Leeds - It was 562.4bhp@28psi on Optimax, How much closer to 600 with race fuel and a bigger turbo?
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
Reply
Old Mar 26, 2003 | 12:22 PM
  #7  
ozzy's Avatar
ozzy
Thread Starter
Scooby Regular
 
Joined: Nov 1999
Posts: 10,504
Likes: 1
From: Scotland, UK
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
Reply
Old Mar 26, 2003 | 12:30 PM
  #8  
WillieF's Avatar
WillieF
Scooby Regular
 
Joined: Oct 1999
Posts: 778
Likes: 0
Post

Jack Clark where are you...

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

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




All times are GMT +1. The time now is 08:24 PM.