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

Get ₹1000 welcome cash by signing-up on Pomento IT Companies

I wanted to put in WDS on 300+ servers however discovered that the server construct didn’t have a neighborhood copy of OS setup or service pack information. I additionally needed to set the paths again to the unique values.

I began by including all information required by WDS to the DFS and I created the next batch file.

**********START**********
@ECHO OFF

REG EXPORT “HKLMSOFTWAREMicrosoftWindowsCurrentVersionSetup” %WINDIRpercentInstallWDS.reg /y
REG ADD “HKLMSOFTWAREMicrosoftWindowsCurrentVersionSetup” /v “SourcePath” /t REG_SZ /d “SERVERNAMESHARE” /f
REG ADD “HKLMSOFTWAREMicrosoftWindowsCurrentVersionSetup” /v “ServicePackSourcePath” /t REG_SZ /d “SERVERNAMESHARE” /f

VER | Discover “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] > %WINDIRpercentInstallWDS.inf
ECHO RemInst = on >> %WINDIRpercentInstallWDS.inf
Sysocmgr.exe /i:sysoc.inf /u:%WINDIRpercentInstallWDS.inf
GoTo CleanUp

:Win2008
ServerManagerCmd -install WDS
GoTo CleanUp

:CleanUp
REG IMPORT %WINDIRpercentInstallWDS.reg
DEL %WINDIRpercentInstallWDS.inf
DEL %WINDIRpercentInstallWDS.reg
**********END**********

The fundamental steps are:
1) Backup registry key to “InstallWDS.reg”
2) Set cache paths for OS and repair pack information (SERVERNAMESHARE which is UNC path to information)
3) Execute the command for set up of element on the detected OS – Word that for Home windows 2003 a file referred to as “InstallWDS.inf” is created
4) Restore registry key backup from step 1
5) Delete “InstallWDS.inf” required by Home windows 2003
6) Delete registry key backup file “InstallWDS.reg”

This batch can simply be modified to put in just about any Home windows element

Get ₹1000 welcome cash by signing-up on Pomento IT Companies

We will be happy to hear your thoughts

Leave a reply

Shopping cart