Forum Home
Press F1
 
Thread ID: 38420 2003-10-06 22:07:00 Reg Query Barnabas (4562) Press F1
Post ID Timestamp Content User
180952 2003-10-06 22:07:00 Hi everyone, I want to use Reg Query (via a batch file) to query all of the workstations on my network to find out what version of MS Security Patches they have installed. I can do it one by one but want to scan all IP ranges and then output to a text file.
Any ideas?
Barnabas (4562)
180953 2003-10-07 03:48:00 You can get the .bat file to do it all for you...
Assuming you use the 192.168 IP range, you should be able to connect to 192.168.0.255 which will do a network broadcast (if I recall correctly) then run your RegQuery on the machines and afterwards put "> X:\file.txt" (without the quote marks) where X: is the drive where you wish for the file to save and file.txt is the filename.
Bear in mind that if you have more than 1 machine (as you obviously do) then using a public network drive will not work as all the machines will overwrite file.txt with their version of it.

If that doesn't work I can get a bat script which starts with the number 1 and will cyclicly move up in the process until it hits 255... Made it when I had too much free time on my hands and wanted to NET Send machines one by one :-p


CyberChuck
cyberchuck (173)
180954 2003-10-07 05:17:00 cyberchuck if you use >> instead of > it will append to the bottom of any existing file with that name instead of over writing it. ;) -=JM=- (16)
180955 2003-10-07 19:06:00 Thanks for that but Im not sure what you mean by "connect" to 192 etc. (by the way Im using 10.120...
I thought you meant something like

reg query \\10.120.40.255\hklm\software e.t.c

but it didnt work.

How do I get it to do a network broadcast??

Appreciate your help.

B.
Barnabas (4562)
1