Mount and customize a Validation OS image

Validation OS ships as a .wim image. You can mount and customize a Validation OS image following the same process as any other Windows image. This topic covers the common ways to customize a Validation OS image. We'll cover:

  • Adding drivers to your Validation OS image
  • Adding optional features
  • How to make registry changes

What you need

To get started working with Validation OS, you need:

  • A PC to run Validation OS:
    • Note: This PC's hard drive will be formatted during the installation process if you're applying a Validation OS image to your device's hard drive.
  • A technician PC with:
    • The most recent Windows Assessment and Deployment Kit and Windows PE add-on installed
    • A folder containing drivers for the Validation OS PC
    • The Validation OS .wim from MS Collaborate
    • Validation OS customization packages
  • A USB drive that you'll use:
    • To Create bootable WinPE media
    • To store collateral that you can use during your Validation OS deployment

Customize your Validation OS image

Add driver packages and Validation OS customization packages to ensure that Validation OS can boot and support the apps for your scenarios. You can add customization packages to add support for:

  • Basic connectivity
  • .NET Framework 4.5
  • PowerShell 5.0
  • And more. See Optional packages for information about available optional packages.

Validation OS doesn't ship with inbox drivers, so you'll have to make sure you add drivers before you can apply your image to your PC.

Mount your Validation OS image

Before you can customize your Validation OS .wim, you'll have to mount it to a folder on your technician PC. Mounting an image expands it into a visible folder structre and makes it so you can make changes to the image.

  1. On your technician PC, open Command prompt as administrator.

  2. Create a folder where you'll mount your image

    md c:\mount
    
  3. Use DISM to mount the image

    DISM /Mount-Image /imagefile:"C:\images\ValidationOS.wim" /index:1 /MountDir:"C:\Mount"
    

    Where C:\images\ValidationOS.wim is your Validation OS image.

    Note

    • Use index:1 if you'll be applying your image to a device's hard drive.
    • Use index:2 if you'll be using the image to boot from a USB drive.

Add .inf drivers to your Validation OS image

Use DISM to add drivers to your Validation OS image. You can add one driver at a time, or a folder of drivers to your mounted image:

  1. Add a single driver that includes an .inf file. In this example, we're using a driver named media1.inf:

    Dism /Add-Driver /Image:"C:\mount" /Driver:"C:\Drivers\PnP.Media.V1\media1.inf"
    

    Where C:\Drivers\PnP.Media.V1\media1.inf is the path to the base .inf file in your driver package

  2. If you want to add an entire folder of drivers, you can use the /Recurse option. This adds all .inf drivers in the folder and all its subfolders.

    Dism /Add-Driver /Image:"C:\mount" /Driver:c:\drivers /Recurse
    
  3. Verify that the drivers are part of the image:

    Dism /Get-Drivers /Image:"C:\mount"
    

    Check the list of packages and verify that the list contains the drivers you added.

(Optional) Add basic connectivity

  • From the Command prompt running as administrator, add the packages to support basic connectivity to your mounted image:

    DISM /Image:"C:\Mount" /Add-Package /packagepath:G:\cabs\neutral\Microsoft-WinVOS-Connectivity-Package.cab /packagepath:G:\cabs\en-us\Microsoft-WinVOS-Connectivity-Package.cab
    

    Where G:\ is the mounted ValidationOS ISO.

(Optional) Add .NET Framework 4.5

  • From the Command prompt running as administrator, add the packages that add .NET Framework 4.5 support to your mounted image:

    DISM /Image:"C:\Mount" /Add-Package /PackagePath:G:\cabs\neutral\Microsoft-Win3-NETFrameworkCompat-Package.cab /PackagePath:G:\cabs\neutral\Microsoft-WinVOS-NetFx45-Package.cab /PackagePath:G:\cabs\en-us\Microsoft-WinVOS-NetFx45-WOW64-Package.cab
    

    Where G:\ is the mounted ValidationOS ISO.

(Optional) Add PowerShell 5.0

  • From the Command prompt running as administrator, add the packages that add PowerShell 5.0 support to your mounted image:

    DISM /Image:"C:\Mount" /Add-Package /PackagePath:G:\cabs\neutral\Microsoft-OneCore-Devices-PowerShell-Package.cab /PackagePath:G:\cabs\en-us\Microsoft-OneCore-Devices-PowerShell-Package.cab
    

    Where G:\ is the mounted ValidationOS ISO.

Modify the registry

You can make changes to the registry in your Validation OS image by loading the registry hive you want to modify onto your technician PC, making changes, and then unloading the hive.

For example, if you want to configure the page file to always be on the boot drive (C:\ is the default letter), you would:

  1. Mount the SYSTEM registry hive from the mounted image onto your technician PC:

    reg load HKLM\VOS_SYSTEM C:\mount\Windows\System32\Config\System
    
  2. Make changes to the associated registry key:

    reg add "HKLM\VOS_SYSTEM\ControlSet001\Control\Session Manager\Memory Management" /v PagingFiles /t REG_MULTI_SZ /d "C:\pagefile.sys 1 16" /f
    
  3. Unload the registry hive from your technician PC.

    reg unload HKLM\VOS_SYSTEM
    

When you unmount your image and commit changes, the registry changes will be saved and available in your image.

Update system boot drive letter

You can make a change to the registry to assign a drive letter to the system boot drive.

Important

This only works prior to the initial boot

  • To change the boot drive letter, follow the step for loading a registry hive offline on Modify the registry.

  • Modify the following registry value, for example to set X:\ as the boot drive letter set the SystemBootDriveLetter value to 88:

    reg add "HKLM\VOS_SYSTEM\ControlSet001\Control\" /v SystemBootDriveLetter /t REG_DWORD /d 88 /f
    

    Note

    The value of SystemBootDriveLetter corresponds to the ASCII decimal value of the character. The minimum value supported is 65 and the maximum is 90 (letters A to Z). Use this list to help you identify ASCII character values: Character set (0 - 127)

  • Unload the hive (Modify the registry) and save your image (Unmount your image)

Unmount your image

  • Now that you've added drivers to your image, you have to unmount the image and commit the changes:

    DISM /Unmount-Image /MountDir:"C:\mount" /Commit
    

    Note

    To revert the changes replace /commit with /discard in the previous command

Next steps

To see how to boot to your Validation OS image, see Setup Validation OS to boot