LogoLogo
OSDeploy.comTwitterPowerShell GalleryGitHub
  • Overview
  • OSDeploy Home
  • Module
    • Release Information
      • 2019-01
      • 2018-12
      • 2018-11
      • 2018-10
      • 2018-09
      • 2018-08
      • 2018-07
    • Functions
      • Main
        • Get-OSBuilder
          • Set Path
      • Maintenance
        • Repair-OSBuildTask
      • OSBMedia
        • New-OSBMediaISO
        • New-OSBMediaUSB
        • Show-OSBMediaINFO
      • OSBUpdate
        • Get-OSBUpdate
        • New-OSBUpdate
      • OSMedia
        • Get-OSMedia
        • Import-OSMedia
          • Batch Import-OSMedia
        • Update-OSMedia
          • Execute
      • OSBuild
        • New-OSBuildTask
          • Remove Appx Provisioned Package
          • Remove Windows Package
          • Remove Windows Capability
          • Disable Windows Optional Feature
          • Enable Windows Optional Feature
        • New-OSBuildTask (External Content)
          • Features On Demand
          • Language Packs
          • IsoExtract Content
          • Language Interface Packs
          • Language Features On Demand
          • Local Experience Packs
          • PowerShell Scripts
            • Update-OneDriveSetup
        • New-OSBuildTask (WinPE)
          • WinPE DaRT
          • WinPE Drivers
          • WinPE PowerShell Scripts
          • WinPE Extra Files
          • WinPE ADK Packages
        • New-OSBuild
      • PEBuild
        • New-PEBuildTask
          • Recovery
          • WinPE
          • MDT
        • New-PEBuild
    • PowerShell Gallery
    • GitHub
  • Docs
    • Reviews
    • Fan Requests
    • Quick Start
    • Tips
      • Task Naming
      • Verbose Logging
      • OSMedia Archive
      • OSMedia Updating
      • OSMedia Failed UBR Change
      • Windows Setup Wallpaper
    • Articles
      • Latest Latest Cumulative Update (Latest LCU)
      • Update Catalogs
      • Windows Setup with DaRT Remote Connection
      • Offline Servicing
      • Servicing Stacks
      • Work with Languages
      • DISM Cleanup Image Pending Operations
      • Win10 1607 Appx Issues
      • Updating an Updated WIM
      • OSBuilder OS Information
      • What Should I Update?
      • Windows 10 Setup and the ei.cfg
      • Automating Windows Update Downloads
      • Solutions
    • Recycle Bin
      • Instructions
        • Detailed
          • pebuild
            • scripts
              • Set-TimeZone
            • WinPE Types
              • Recovery
              • Recovery DaRT
              • Windows PE
              • MDT
            • Auto ExtraFiles
            • Drivers
              • RegAdd ActivePowerScheme
              • RegAdd AeroLite Theme
              • RegAdd Browse
              • RegAdd PowerShell ExecutionPolicy
            • ExtraFiles
              • Wallpaper
          • Update
      • OSBuilder New-OSBTemplate
      • OSBuild Templates
    • Guides
      • OSBuild Arcade
        • Frogger
      • OSBuild Templates
      • OSBuild Registry
      • Windows 7 SP1
        • Import OSMedia
        • Download Updates
        • NVMe Hotfix
        • Update OSMedia
        • ISO Testing
      • Windows 10 1809 RSAT Capability
      • registry
        • OSBuild Registry REG
          • Certificates
        • OSBuild Registry XML
    • The Basics
      • Requirements
      • Installation
      • Support
      • Get Started
      • Update OSBuilder
      • Import an OS
      • OS Information
      • Update an OS
      • Update an OS (Process)
      • Create External Media
        • Create an ISO
        • Create a USB
      • Create an OSBuild
Powered by GitBook
On this page
  • New-OSBuild
  • Group Policy Preferences
  • Converting REG to XML
  • Samples
  • Known Issues

Was this helpful?

  1. Docs
  2. Guides
  3. registry

OSBuild Registry XML

PreviousCertificatesNextThe Basics

Last updated 5 years ago

Was this helpful?

OSBuilder 19.2.5 has moved Registry to OSBuilder\Templates\Registry This guide will be updated soon

Only Registry Keys that use these Paths are supported HKEY_CURRENT_USER HKEY_LOCAL_MACHINE\SOFTWARE HKEY_LOCAL_MACHINE\SYSTEM HKEY_USERS\.DEFAULT

You can use Registry XML files with OSBuilder. I'll get into how to create them a little further down, but here is an example of what a Registry XML file for adding Desktop Icons in a User's registry looks like. As you can see in the XML file, the Registry will make changes in the Current User's Hive.

The Registry XML file should be placed inside an appropriate AutoApply Filter directory. In this example, I have placed this XML file in the Global Filter with two other Registry XML files for setting the default Internet Explorer Start Page. Since this exists in Global, it will be applied to every OSBuild that gets created

New-OSBuild

During a New-OSBuild, the three Registry XML files are processed and added to the mounted Offline Registry automatically

The results should speak for themselves. I have successfully customized the Default User profile with minimal effort

Group Policy Preferences

So why XML? Because you are probably already using Registry XML in Group Policy Preferences. Read more about GPP Registry in the following link

If you take a look at a Group Policy Object on your Domain's Sysvol that has an enabled GPP Registry, then you should have a Registry.xml file for Machine Preferences and User Preferences

You can easily just copy the whole GPO into the proper Registry AutoApply Filter

And watch it rain. Keep in mind this will not import the entire Group Policy, just settings in the Registry.xml files. Ideally, you should create a separate unlocked GPO and configure all your OSBuild settings in there, and use that GPO for settings to your OSBuild

Converting REG to XML

There are a few ways to convert a regular REG file to an XML. I find it easy enough to use an online converter

But you can also download a PowerShell script to do the work

Samples

Feel free to download some Registry XML samples on my GitHub

Computer Disable Logon Background Image.xml

User Desktop Icons.xml

Win10 User Content Delivery Manager.xml

User Windows Explorer.xml

User Control Panel View.xml

Known Issues

There are a few things to know. Some Registry Keys are protected by Trusted Installer. These keys cannot be overwritten. I have not seen many keys like this, but they do exist

And some Registry Keys should not exist until Windows Setup is complete, like setting Default Associations. This is easy enough to test by creating a Media ISO and installing on a Virtual Machine

In some tests I have had the Registry not unload properly, usually if I am doing a large amount of changes. I'm still trying to narrow down what is causing it (could be some System Protection). If a Registry Hive doesn't unload properly, then OSBuilder will halt the New-OSBuild process to allow you to manually open Regedit and unload the Hive. This must be done in Regedit as the Reg Unload command does not work as it is locked

​