Link to home
Start Free TrialLog in
Avatar of janhoedt
janhoedt

asked on

Reg query (IE9 to list of computers)

Hi,

I have this list of 30 pc's to which I would like to query
\HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer" /v version | find "version"

Please advise howto.
J.
Avatar of oBdA
oBdA

In batch (save as Whatever.cmd and change "test.txt" to the list with your PCs):
@echo off
setlocal
set ComputerFile=test.txt
set LogFile=Results.csv
if exist "%LogFile%" del "%LogFile%"
for /f %%a in ('type "%ComputerFile%"') do (
	for /f "tokens=2*" %%i in ('reg.exe query "\\%%a\HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer" /v "version" ^| find /i "Version"') do (
		echo %%a: %%j
		>>"%LogFile%" echo %%a,%%j
	)
)

Open in new window

Avatar of janhoedt

ASKER

Thanks!
Meanwhile did this:
for /f %A in (serverlist.txt) do reg query "\\%A\HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer" /v version | find "version"

Works also but some pc's are not reachable, howto built in a timeout of f.e. 1 ping?
ASKER CERTIFIED SOLUTION
Avatar of oBdA
oBdA

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial