I have scripted SystemRoot.bat to generate a CSV list of all the computers in a domain, showing the Windows drive/folder, O/S version, service pack, and product name, like:

"JSI001","C:\WINDOWS","5.2","Service Pack 1","Microsoft Windows Server 2003"
"JSI003","C:\WINDOWS","5.1","Service Pack 2","Microsoft Windows XP"
"JSI005","C:\WINNT","5.0","Service Pack 4","Microsoft Windows 2000"
"JSI007","C:\WINDOWS","5.2","Service Pack 1","Microsoft Windows Server 2003"
"JSI009","C:\WINDOWS","5.1","Service Pack 2","Microsoft Windows XP"
The syntax for using SystemRoot.bat is:

SystemRoot..

The CSV list is displayed on the console, put you can pipe it to a file using:

SystemRoot>FileName.

NOTE: If NETDOM.EXE is not installed on the computer you will use to run SystemRoot.bat, install it from the Support / Tools folder of your O/S CD-ROM.

SystemRoot.bat contains:

@echo off
setlocal ENABLEDELAYEDEXPANSION
set netdm=netdom query /domain:%userdnsdomain%
for /f "Skip=1 Tokens=*" %%c in ('%netdm% dc^|find /v /i "The command completed successfully."') do (
 set cmp=%%c
 call :doit
)
for /f "Skip=1 Tokens=*" %%c in ('%netdm% server^|find /v /i "The command completed successfully."') do (
 set cmp=%%c
 call :doit
)
for /f "Skip=1 Tokens=*" %%c in ('%netdm% workstation^|find /v /i "The command completed successfully."') do (
 set cmp=%%c
 call :doit
)
endlocal
exit /b 0
:doit
set work=%cmp:     ( Workstation or Server )=%
if "%work%" NEQ "%cmp%" set cmp=%work%#
set cmp=%cmp: #=%
set cmp=%cmp:#=%
set cv=
set sp=
set pn=
set sr=
for /f "Tokens=2*" %%r in ('reg query "\\%cmp%\HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v CurrentVersion^|find "REG_"') do set cv=%%s
for /f "Tokens=2*" %%r in ('reg query "\\%cmp%\HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v ProductName^|find "REG_"') do set pn=%%s
for /f "Tokens=2*" %%r in ('reg query "\\%cmp%\HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /V SystemRoot^|find "REG_"') do set sr=%%s
set pn=!pn:,= !
call :csdv>nul 2>&1
@echo "%cmp%","!sr!","!cv!","!sp!","!pn!"
goto :EOF
:csdv
set sp=None
for /f "Tokens=2*" %%r in ('reg query "\\%cmp%\HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v CSDVersion^|find "REG_"') do set sp=%%s
set sp=!sp:,= !