Tool: OSConfig (Preview)

I thought I would take the time to share something I have been working on for the last week.  Hopefully it will help speed up your Configuration and Deployment of Windows 10 (and other OS’s).  Please note that the screenshots are from my DEV build and may change prior to release.


The purpose of OSConfig is the following:

  • Integrate OEM Folders into an Operating System
  • Apply Settings to the Default User Profile (replaces Unattend CopyProfile)
  • AppxPackage removal before the OS is initialized
  • Theme configuration
  • Registry Snapshot for comparing Registry changes


OSConfig will be fully compatible with Microsoft Deployment Toolkit (MDT) and Configuration Manager (OSD).  All versions.  Integration is through the Unattend.xml and the Task Sequence

Installation in MDT

The first step to install OSConfig is to add the ZTIOSConfig.wsf script to the %ScriptRoot% of your Deployment Share.


The second step is to add the OSConfig Framework to your Applications directory.  As you can see there is support for multiple Operating Systems.


Installation in SCCM

For SCCM, all you need to add is ZTIUtility.vbs and create a Package  🙂


Integration with Unattend.xml

A single entry in RunSynchronous is all that is needed for proper integration.


Integration with a Task Sequence

Ideally the ZTIOSConfig.wsf should be run prior to the Install Operating System step in the Install Phase.  It will precede the Install OS step in OSD as well.

For the purpose of testing, I have placed ZTIOSConfig.wsf just prior to the Restart computer step in Postinstall.  Additionally, I have added two Pause Steps, one right before (so I can take a Checkpoint in Hyper-V) and one right after, so I can validate things before restarting from WinPE.


In testing ZTIOSConfig.wsf, I prefer to run directly from cscript, this way I can execute it multiple times, but you won’t be testing the script like this.


The logging below should give you an idea of how it works (don’t worry it is also logged in BDD.log).

  • Determines the Operating System and Architecture being deployed
  • Locates OSConfig, either in Applications\OSConfig or in the same directory as ZTIOSConfig.wsf
  • Copies Settings directory to %OSDisk%\_SMSTaskSequence\OSConfig\Settings
  • Copes OEM files to to %OSDisk%\_SMSTaskSequence\OSConfig\$OEM$
  • Generates OSConfig.cmd


This is how the directory structure looks after execution


OSConfig Execution

OSConfig in WinPE is really all about staging.  It doesn’t get executed until it is picked up by the Unattend.xml (prior to first login and first profile creation).  If you have 8 minutes of time, the video below will show the process from the WinPE Reboot to Completion.

Apply Settings

The Apply Settings step in OSConfig looks for files (BAT, CMD, PS1, REG, VBS) in the proper Operating System directory.  Think of this directory as a Library for your OS Configuration.

In the screenshot below you can see the files that make up my Windows 10 build.


Additionally User Configuration can be made in HKCU.


What is unique with OSConfig is that it reads the Reg files that are being imported.  In the image below the first red box shows that HKEY_CURRENT_USER was not found, so no action was taken.  On a Reg file that does contain HKEY_CURRENT_USER, a copy of the Reg file is made, and HKEY_CURRENT_USER is replaced with HKEY_LOCAL_MACHINE\DefaultUser.


One of the first steps of OSConfig was to mount the Default User hive, so after OSConfig makes the copy and replacement, it imports the Reg file.  In the image below the Reg files were created by OSConfig.  So now every change that you want to make is done in the Default User Profile, even before the Administrator Profile has been created.


And this is what allows me to have a fully configured OS prior to first Logon of even the Administrator Account in the MDT Task Sequence.  So there is no need to use CopyProfile in my Unattend.xml or to create a Sysprep Image if all I am going to do is install Applications from this point forward.


Registry Snapshots

The last thing I will preview is Registry Snapshots.  By default OSConfig will export specific keys in the Registry before any changes are made.  After OSConfig has completed making its changes, a secondary set of Registry Snapshots are created.


Additionally, a Snapshot Command Script is created that will create a new export and pausing before creating a second Snapshot.


This will allow you make changes to the OS, and then use Notepad++ Compare to determine what changed so you can easily generate new Reg files for use with OSConfig.


Release Date

I mentioned this was a Preview.  After further testing in MDT and OSD, I’ll go ahead and share the scripts.  In the mean time if you think this may work for you, then go ahead and start making Reg and scripts to make the changes to your OS.