Putting in Home windows Deployment Expert services (WDS) From a Batch File

I essential to install WDS on 300+ servers but discovered that the server create did not have a regional duplicate of OS set up or support pack files. I also required to set the paths back to the authentic values.

I started off by adding all information necessary by WDS to the DFS and I established the following batch file.


REG EXPORT “HKLMSOFTWAREMicrosoftWindowsCurrentVersionSetup” %WINDIR%InstallWDS.reg /y
REG Incorporate “HKLMSOFTWAREMicrosoftWindowsCurrentVersionSetup” /v “SourcePath” /t REG_SZ /d “SERVERNAMESHARE” /f
REG Add “HKLMSOFTWAREMicrosoftWindowsCurrentVersionSetup” /v “ServicePackSourcePath” /t REG_SZ /d “SERVERNAMESHARE” /f

VER | Obtain “Microsoft Windows [Version 5.2.” > nul
If %ERRORLEVEL% == 0 GoTo Win2003
VER | Find “Microsoft Windows [Version 6.0.” > nul
If %ERRORLEVEL% == 0 GoTo Win2008

GoTo CleanUp

ECHO [Components] > %WINDIR%InstallWDS.inf
ECHO RemInst = on >> %WINDIR%InstallWDS.inf
Sysocmgr.exe /i:sysoc.inf /u:%WINDIR%InstallWDS.inf
GoTo CleanUp

ServerManagerCmd -put in WDS
GoTo CleanUp

DEL %WINDIR%InstallWDS.inf
DEL %WINDIR%InstallWDS.reg

The basic techniques are:
1) Backup registry essential to “InstallWDS.reg”
2) Set cache paths for OS and assistance pack data files (SERVERNAMESHARE which is UNC path to information)
3) Execute the command for set up of component on the detected OS – Note that for Windows 2003 a file termed “InstallWDS.inf” is made
4) Restore registry crucial backup from action 1
5) Delete “InstallWDS.inf” essential by Windows 2003
6) Delete registry essential backup file “InstallWDS.reg”

This batch can quickly be modified to set up nearly any Windows part

Leave a Reply