Hands-off deployments
Â
Let’s face it, guys.  There are times that you JUST don’t have access to SCCM, MDT or Kace, and need to deploy a completely automated and silent Windows install without our normal build tools.  If this is you, and you deploy systems frequently, you’ve probably spent way too much time looking at screens like this one
Not only does it stink to have to type a user name and password every time, it also slows you down. Admit it, whenever you start a Windows install, you start doing something else, and then an hour later check back and have to reload the whole task in your memory again.  It’s a giant waste of time and makes you less productive.
To top it off, there are probably things you always do, like setup user accounts, join a machine to a domain, and set the time zones (we can’t all live in the chosen timezone of Pacific Standard Time).
Previously, making these changes and baking them in to an unattended install meant using the terrible Windows SIM tool, which was horrible. Seriously, no offense meant, but if you had a hand in designing the System Image Manager tool, I’m sure you’re already ashamed. Good, you should be.
Thankfully we now have the Windows Image Configuration Designer (Wicd) which makes this all super easy!
In this post, we’ll walk you through everything you need to do to make a fully silent, unattended Windows Install, along with some useful settings too.  We will be installing WICD, which is part of the ADK, and then walk through configuring the following settings:
-
‘Enable Remote Desktop out of the box’
-
Set Default Time zone (no west coast time!)
-
Set Default First User
-
Silent Install (depends on setting a user account)
-
Make the computer do a quick virus scan on first boot
-
Optional - Domain Join
-
Optional -Â Add files to the image
-
Optional - Make Registry Changes on the Image
Setting up WICD
To get access to the awesome WICD tool, you’ll need to have the Windows 10 ADK. I recommend using version 1607, at a minimum (Download Link). When installing the ADK make sure to check the two red boxes shown below, for full features.
If you’re installing the ADK as a prerequisite for SCCM, be sure to check all four boxes shown above, at a minimum.
Next, download you’ll need a copy of your Windows ISO, mount or unzip it. We’ll be looking for this file very soon, E:\Sources\install.wim.  Later on, we’ll need to reference additional files from it too, so keep it mounted there till the very end!
Now, open WICD and click ‘Windows image customization’
Click through the next few pages, specifying a project folder and then selecting ‘Windows Image File’.
Â
WICD supports working with Windows Flashable Image files as well, the FPU file format.  This is the only option for Win10Iot, but not relevant to what we’re doing here, so select the top option (WIM File)

- AccountOU - DestinationOU
- (Optional) ComputerName - Want to change the computer name? Â You can! Â I use FOX-%RAND:5% to make computers name FOX-AES12 or other random names.
- (Optional) DomainName - Domain to join Password - Domain Join Account Password
How to save this as a image
Once you’re satisfied with all of your changes, it’s time to export our settings and get to imaging.  Click Create \ Clean Install Media, from the top of the WICD toolbar.
Be sure to chose WIM format, then click next.
WICD has a super cool feature, it can directly create a bootable Windows 10 thumbdrive for you!  AWESOME!  So if you’re happy building systems this way, go for it!  If you’d instead like to make a bootable ISO, select ‘Save to a folder’ instead.
Assuming you choose to save to a folder, provide the path on disk for the files.
Remember to click Build, or you can sit here at this screen for a LONG time!
When this completes, you’ll have a folder like this one, which looks exactly like what you see when you mount a Windows Install disk.
We can now edit the files here on our build directory before we package it up in an image!
Optional: Add files to the image
One thing I like to do on all of my images is include a good log file viewer.  If you’d like to add some files to be present on your machines imaged with this WIM, give this a shot.
First, create a directory to mount the file system from the .WIM file. Â I made mine at C:\Mount.
Next, browse out and find the install.wim we just saved in the last step, mine is in C:\temp\2016LTSBCustom
Now…to mount the filesystem.
Dism /Mount-Image /ImageFile:C:\temp\2016LTSBcustom\sources\install.wim /index:1 /MountDir:C:\Mount
With this done, we can now browse out to the disk and we’ll see the install.wim file we just created earlier, as it will be expanded out on disk.  This is what it’s going to look like when Windows has finished installing using our image!
It’s such a pristine filesystem, just as it would be when freshly imaged!
Feel free to stage any files on disk, folders, you name it. Â Go crazy here. Â You can install portable apps and point it to the locations on this new Windows image. Â Or you could copy your companies branding and logos down onto the machine, add a bunch of data or files you need every machine to have. Â The sky is the limit.
For me, it’s enough to copy CMtrace.exe into the C:\mount\Windows\system32 folder, to ensure that it will be on disk when I need it!
If this good enough, scroll down to Pack up the image, or you could…
Optional: Make Registry Changes on the image
While we have the filesystem expanded on our PC, you can also stage registry settings too!  That’s right, you can edit the registry contained within a .wim file!  Awesome!
Most people don’t know it, but the registry is just a couple of files saved on disk.  Specifically, they’re found at C:\Windows\system32\config.  That means in our expanded image, it will be found at c:\mount\Windows\system32\config.  Windows-chan is very shy and doesn’t want you peeking under her skirt, so she makes you make SURE you know what you’re doing.
Â
These translate like so:
HKEY_LOCAL_MACHINE \SYSTEM Â Â Â Â Â Â Â Â Â Â \system32\config\system HKEY_LOCAL_MACHINE \SAM Â Â Â Â Â Â Â Â Â Â Â Â Â Â \system32\config\sam HKEY_LOCAL_MACHINE \SECURITY Â Â Â Â Â Â Â Â Â \system32\config\security HKEY_LOCAL_MACHINE \SOFTWARE Â Â Â Â Â Â Â Â \system32\config\software HKEY_USERS.DEFAULT Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â \system32\config\default
We can mount these guys into our own registry and mess with them using Regedit!  Cool!  As an example, to mount the Default User’s Profile for our new Image, you’d run:
reg load HKLM\Mount c:\mount\windows\system32\config\default
When that completes, we can open regedit and…
When you’re done hacking around, you can save the settings by running:
reg unload HKLM\Mount
Now, we’re almost done…
Packing up the image
We’ve made all of our changes, but still have the .WIM opened up on our computer, mounted at c:\Mount.  To save the changes back into a .WIM file, run this command.
dism /unmount-wim /mountdir:C:\Mount /commit
Here’s the output….
And now, the very final step.
Convert to a bootable ISO
With all of our  changes completed, it’s time to take our file structure on disk and make it into a bootable ISO file for mass deployment.  You could spend hours fumbling around…or just use Johan’s awesome script, available here!
And that’s it?  Any other must have automation tips you think I missed?  Let me know!  Of course, if you want to REALLY automate things, you need to look at WDS, MDT, or SCCM!  But for test lab automation, these settings here have saved me a load of time, and I hope they help you too!