Listing 1: Baseline.bat @ECHO OFF REM ********************************************************* REM Name: BASELINE.BAT REM Version: 1.0 REM Date: 9.Dec.2003 REM Author: Jason Fossen REM Purpose: Dump local machine's network configuration info. REM Usage: Redirect output to a file (baseline.bat > file.txt). REM Notes: At the bottom is a list of the other scripts/tools REM this script calls and their sources. This script works REM on Windows 2003/XP/2000 but not Windows NT/9x. REM Legal: Script provided "AS IS" with no warranties. REM ********************************************************* netdiag.exe | findstr.exe /V "Q...... KB......" del NetDiag.log 1>nul 2>nul rpcdump.exe /I /V cscript.exe device.vbs cscript.exe service.vbs /L ipconfig.exe /all nbtstat.exe -n netstat.exe -an | findstr.exe "LISTENING UDP" cscript.exe protocolbinding.vbs netset.exe /display net.exe share net.exe use m: %LOGONSERVER%\sysvol 1>nul 2>nul IF %ERRORLEVEL%==0 (ECHO Sysvol mapping successful!) ELSE (ECHO Sysvol mapping failed.) net.exe use m: /d 1>nul 2>nul ver | findstr.exe "2000" 1>nul 2>nul IF %ERRORLEVEL%==0 ( secedit.exe /refreshpolicy machine_policy 1>nul 2>nul secedit.exe /refreshpolicy user_policy 1>nul 2>nul ) ELSE ( gpupdate.exe /force 1>nul 2>nul ) gpresult.exe | findstr.exe "Last time" REM ********************************************************* REM Tools Required and Their Sources REM ********************************************************* REM NETDIAG.EXE Windows 2003/XP/2000 Support Tools. REM IPCONFIG.EXE Built into Windows 2003/XP/2000. REM NBTSTAT.EXE Built into Windows 2003/XP/2000. REM GPRESULT.EXE Built into Windows 2003/XP/2000. REM NETSTAT.EXE Built into Windows 2003/XP/2000. REM NET.EXE Built into Windows 2003/XP/2000. REM CSCRIPT.EXE Built into Windows 2003/XP/2000. REM SECEDIT.EXE Built into Windows 2000, REM not used for GPO updates with 2003/XP. REM GPUPDATE.EXE Built into Windows 2003/XP, not in 2000. REM RPCDUMP.EXE Windows 2000 Server Resource Kit. REM DEVICE.VBS Windows 2000 Server Resource Kit. REM PROTOCOLBINDING.VBS Windows 2000 Server REM Resource Kit. REM SERVICE.VBS Windows 2000 Server Resource Kit. REM NETSET.EXE Windows 2000 Server Resource Kit. REM Windows XP Support Tools. REM ********************************************************* REM If the OS is Windows 2000, use SECEDIT.EXE to force REM Group Policy refresh. REM If the OS is Windows 2003/XP, use GPUPDATE.EXE REM to force Group Policy refresh.