404 Tech Support

Customizing Windows 8.1 for deployment

I was hoping to hit the ground running when Windows 8.1 reached general availability and get everything ready for deployment pretty quickly. Unfortunately, some other projects came up and Windows 8.1 got put off to the side. Even more detrimental to the project was the fact that Windows 8.1 changed how things worked compared to my customized Windows 7 SP1 deployment.

Namely, I was hoping to produce a nice, branded deployment with default settings like Boot to Desktop, show wallpaper behind Start, and a default wallpaper. Finally, I found a method that worked out. I could have easily assigned a wallpaper and Start Screen layout through Group Policy for after install but another reason that I like this approach is that it starts people off with my suggestions but then allows them to change it if they would like.

The wallpaper actually ended up being one of the most challenging settings. With Windows 7, I was able to set an HKLM registry key and point it to a theme that included my desired wallpaper. In Windows 8.1, that method no longer worked, nor did a ton of other methods I tried to make it work. I finally found an approach that did work by modifying the files on the install media. I’m using Microsoft Deployment Toolkit, so I just imported the modified operating system and was able to stick with the thin image approach rather than tweak, sysprep, and capture.

To modify Windows 8.1

Extract the iso using 7-zip or copying the media to a folder on your hard drive.

Create an empty folder on your hard drive to mount the image.

Mount the install.wim using the command:

dism /mount-wim /WimFile:"C:\Path\to\install.wim" /index:1 /Mountdir:C:\Mount

You can now browse the mounted install.wim and modify the files. The install.wim is the windows image that will be copied over during install and expanded.

Default wallpaper

To set the default wallpaper, replace C:\Windows\Web\Wallpaper\Windows\img0.jpg with another .jpg of the same resolution.

I had to take ownership of the file and give Administrators permission to modify it in order to replace it.

Default avatars

You can also replace the different sized images here: C:\ProgramData\Microsoft\User Account Pictures
to change the default avatars to something company specific instead of the standard silhouettes.

OEM details

The OEM details are minor details. When you right-click on This PC and go to Properties, you will see the OEM information listed. I used it to set a little logo, the company name, our phone number, and website.

Copy any new files like the OEM logo to where you want them to be after the install, c:\[mountedfolder]\IT will become C:\IT upon install. The OEM logo needs to be 120x120px bitmap and the path is a limited length, so don’t bury it too far.

With regedit, load the Software Hive under C:\[mountedfolder]\windows\system32\config\software. This allows you to edit the registry hive of what will become hklm\Software. (Modify the path below with where you loaded this hive.)

reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\OEMInformation /v Manufacturer /t REG_SZ /d "404 Tech Support"
reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\OEMInformation /v SupportPhone /t REG_SZ /d "555-404-HELP"
reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\OEMInformation /v SupportURL /t REG_SZ /d "http://www.404techsupport.com/"
reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\OEMInformation /v Logo /t REG_EXPAND_SZ /d "C:\IT\oemlogo.bmp"

Start Screen default controls

I wanted the Internet Explorer start title to open in Desktop mode by default. With the HKLM\Software hive still loaded, you will change this value to a 0 (zero).

REG.exe ADD "HKLM\Software\Microsoft\Internet Explorer\Main" /v ApplicationTileImmersiveActivation /t REG_DWORD /d 0 /f

You can now unload this hive.

I also want to set the computer to boot to desktop, show the wallpaper behind the Start Screen, and some other settings. Load the hive under C:\[mountedfolder]\users\default\ntuser.dat (modify the below paths to where you loaded this hive)

reg add hku\temp\Software\Microsoft\Windows\CurrentVersion\Explorer\StartPage /v OpenAtLogon /t REG_DWORD /d 00000000 /f
reg add hku\temp\Software\Microsoft\Windows\CurrentVersion\Explorer\StartPage /v MonitorOverride /t REG_DWORD /d 00000001 /f
reg add hku\temp\Software\Microsoft\Windows\CurrentVersion\Explorer\StartPage /v MakeAllAppsDefault /t REG_DWORD /d 00000000 /f
reg add hku\temp\Software\Microsoft\Windows\CurrentVersion\Explorer\StartPage /v DesktopFirst /t REG_DWORD /d 00000000 /f
reg add hku\temp\Software\Microsoft\Windows\CurrentVersion\Explorer\StartPage /v MotionAccentId_v1.00 /t REG_DWORD /d 0x000000db /f

Don’t unload this hive just yet.

Start Screen default layout

In order to set the Start Screen layout for default user (and new profiles), Windows 8.1 includes some new PowerShell utilities to import/export the layout. To use Group Policy, you export the layout as a .xml file. To apply it to the image, you export it as a bin file.

Customize the Start Screen to exactly how you want it by rearranging tiles, giving groups layouts, and pinning the applications that you want.

From PowerShell, run this command:

Export-StartLayout -As BIN -Path CustomStartScreenLayout.bin -Verbose

To import it to your mounted install.wim, run this command from an admin-elevated command prompt:

POWERSHELL -NonInteractive -Command Import-StartLayout -LayoutPath .\CustomStartScreenLayout.bin -MountPath C:\[mountedfolder]

Desktop icons

To show This PC and Documents on the desktop, we will add some registry entries to the default HKCU hive.

reg add hku\temp\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel /v {20D04FE0-3AEA-1069-A2D8-08002B30309D} /t REG_DWORD /d 00000000 /f
reg add hku\temp\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel /v {59031a47-3f72-44a7-89c5-5595fe6b30ee} /t REG_DWORD /d 00000000 /f

You can now unload this hive.

All of the changes are now made to the install.wim. Double-check that the registry hives are unloaded and any folders to the mounted location are closed.

Now you can unmount the image by running this command:

dism /unmount-wim /mountdir:C:\Mount /commit

Your next steps will be to import the install media folder that was just unmounted into MDT and setup your task sequence to deploy it. With these customizations made to the install media itself, the task sequence should be more straight-forward with less scripts and commands to try and achieve the same results.