MDT FUNdamentals: Reghacks in Your Task Sequences

Nothing like testing a new image build task sequence. It’s about as fun as watching paint dry, but I’ll take it any day of the week over building them by hand like the clonezilla peasants do.

I’m a big fan of using MDT to build images for several reasons, the least of which is just saving time, I’d much rather engineer the automated tweaks now, and be able to consistently and reliably be able to automate that same build once a month after every patch Tuesday. Given enough time and effort, you can fully automate your image build to the point that you don’t need to run ltisuspend to do some of these things by hand in the image.

I know, I know, lots of what I’m about to show can be done with GPOs and yes, its probably better to keep your image on the lean side, but these are just examples of how you can use commandline steps to call reg.exe and add or delete certain registry keys directly in the task sequence when building a reference image. Remember, with great power comes great responsibility…

To call reg.exe is easy, simply create a single commandline step in your tasksequence.


reg.exe add "HKCU\Control Panel\Desktop" /v Wallpaper /t REG_SZ /d C:\background.jpg /f

In the past, I’ve exported and imported .reg files, and configured them as applications, which does give the advantage of them being somewhat modular, but in this case, I simply just need to make a dozen or so tweaks to the default admin account prior to running sysprep, this way this wallpaper is the default for the new user as I use the copy profile trick to get this set as the starter wallpaper on the new image.

Here are a few others I throw in the image so they’ll end up in the default profile.

reg.exe add "HKLM\SOFTWARE\Microsoft\.NETFramework" /v EnableIEHosting /t REG_DWORD /d 1 /f

reg.exe add "HKCU\AppEvents\Schemes" /t REG_SZ /d ".None" /f

reg.exe delete "HKEY_CURRENT_USER\Software\Microsoft\Office\Common\UserInfo" /f