A Blast From The Past – Jurassic Deployment

So….

  • Is it good? No.
  • Is it dynamic? No.
  • Does it support settings? No.
  • Does it support applications? No.
  • Does it have any error handling? Also, no.
  • Does it support drivers? Barely.
  • But it is fast… 🙂

Before Altiris, BDD, MDT, SMS, PowerShell, and ConfigMgr and other deployment solutions there were batch files…. And many organizations wrote their own little deployment solution using said batch files.

Disclaimer #1: I wrote this post more for fun than anything else, and I definitely recommend using a real deployment solution for your every day deployments. That being said, should you ever want to deploy Windows 10 to a few physical computers, super-fast, for say Windows Autopilot testing. Or should you need to remove any deployment solution out of the picture from your OSD troubleshooting. Yep, this does work. 🙂

Disclaimer #2: You should REALLY not be using this example for any production deployment, but this post is here to highlight, and possibly educate you, of the bare minimum steps needed to deploy Windows 10 over the network.

Still here? Ok then…

Here follows an example of a batch file that deploys a Windows 10 2004 image. You simply run the deploy.cmd batch file from WinPE and walk away. The script assumes you have a file share with the following

  • A Windows 10 2004 WIM Image
  • A Diskpart.ini script (UEFI example here)
  • An Unattend.xml template (Windows 10 x64 example here)
  • Some drivers (if needed)

Deploy.cmd script

@Echo off
Echo Press any key to continue, or press any other key to exit...
pause >nul

REM Connect to file share
Net Use Z: \\MDT03\JurassicDeployment /u:mdt_ba [email protected]

REM Create UEFI volumes via diskpart
Diskpart /s Z:\diskpart.ini

REM Apply the WIM image
DISM.exe /Apply-Image /ImageFile:Z:\REFW10-X64-2004.wim /Index:1 /ApplyDir:W:

REM Prepare Boot Partition
BCDBoot.exe W:\windows /l en-US
bcdedit.exe /timeout 0

REM Add drivers
md W:\Drivers
xcopy Z:\Drivers W:\Drivers /e /i

REM Copy and Apply the Unattend.xml
md W:\Windows\Panther
Copy Z:\Unattend.xml W:\Windows\Panther\Unattend.xml
md W:\Scratch
dism.exe /Image:W:\ /Apply-Unattend:W:\Windows\Panther\Unattend.xml /ScratchDir:W:\Scratch
rd W:\Scratch /s /q
rd W:\Drivers /s /q

REM Reboot to Windows 
wpeutil reboot

About the author

Johan Arwidmark

4.4 7 votes
Article Rating
Subscribe
Notify of
guest
10 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments
Sam Raghu
Sam Raghu
6 months ago

This reminds me of the days of slip streaming some universal network driver pack into a WinPE then executing this via cmd prompt to reimage a few random metals. Quick and dirty and to the point.

Excellent.

Last edited 6 months ago by Sam Raghu
Joe
Joe
9 months ago

You make me feel old. lol. Batch files is how I did everything in the past. Of course my first computer course was in 1979 and my first computer build was in 1983. Thanks Johan for the script — going to play around for nostalgic reasons. Thanks for all your articles and advice.

Thomas A Gladden
Thomas A Gladden
9 months ago

I wrote an enterprise solution for Kmart and Sears back in the day that had many of those elements, all home grown, using scripts, HTML and DB

RainerP
9 months ago

Hi Johan!
VERY cool stuff, straightforward, brute force batching (programming?) …
JUST PHUN 🙂
BTW.:
raised my own blog on such topics, see below …
and I DO remember your first session at – good old – TechEds about building & using WinPE 🙂
Have written some hundreds of these "batches" in the last 30 years 🙂
So thx again for that post and PLEASE continue your great community work!
"Doc Windows" from Germany (Rainer)

Sergey Korotkov
9 months ago

Ahhahaha! Super! 🙂

Anders Lennqvist
9 months ago

I made a deployment of Windows for workgroups with office using batch files many years ago. I was working temporary at a local IT-store in the beginning of the nineties. A municipality had bought a batch of more than 40 computers and that was a lot at these times. We did not feel like installing them manually especially the office package since it usually failed at the last diskette, about number 20… In house there was a fileserver of the great make Novell. Since this was before the windows registry, We poured the entire Windows library on to a file… Read more »

Anders Lennqvist
8 months ago

Thank You for your original post btw. It is always nice to take part of Your work Johan.


>