This batch file is a mere collection of calls to other batch files, to restore network configuration settings on a Windows server. It assumes you have collected the network configuration and written the settings to text files, e.g. by using checkNetwork.bat. The other batch files, as well as the inputfiles, are expected in the the same directory as the restore script
Note that some network settings should have been configured during server setup and active directory installation.
@ECHO OFF
ECHO trying to restore network configuration
ECHO.
REM checking for necessary files
FOR %%i in (setDHCP.bat, dhcp.txt, setWINS.bat, wins.txt) do ( IF NOT EXIST ./%%i ECHO can not find %%i, aborting ... && EXIT /B 1 )
REM main
ECHO restoring network configuration
ECHO ON
CALL setDNS.bat
CALL setDHCP.bat
CALL setWINS.bat
ECHO done.