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

I essential to put in WDS on 300+ servers but found that the server establish did not have a area duplicate of OS set up or assistance pack files. I also preferred to established the paths back again to the authentic values.

I started by adding all documents demanded by WDS to the DFS and I made the next batch file.

**********Start out**********
@ECHO OFF

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

VER | Find “Microsoft Home 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

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

:Get2008
ServerManagerCmd -set up WDS
GoTo CleanUp

:CleanUp
REG IMPORT %WINDIR%InstallWDS.reg
DEL %WINDIR%InstallWDS.inf
DEL %WINDIR%InstallWDS.reg
**********Stop**********

The primary techniques are:
1) Backup registry crucial to “InstallWDS.reg”
2) Established cache paths for OS and provider pack information (SERVERNAMESHARE which is UNC route to files)
3) Execute the command for installation of ingredient on the detected OS – Notice that for Windows 2003 a file termed “InstallWDS.inf” is created
4) Restore registry vital backup from step 1
5) Delete “InstallWDS.inf” necessary by Windows 2003
6) Delete registry vital backup file “InstallWDS.reg”

This batch can conveniently be modified to put in virtually any Windows part

Leave a Reply