View Full Version : Reg Query

07-10-2003, 11:07 AM
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?

07-10-2003, 04:48 PM
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 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


07-10-2003, 06:17 PM
cyberchuck if you use >> instead of > it will append to the bottom of any existing file with that name instead of over writing it. ;)

08-10-2003, 08:06 AM
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 \\\hklm\software e.t.c

but it didnt work.

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

Appreciate your help.