Windows 10 Upgrade Splash Screen – Take 2

Recently I tweeted a picture of the custom Windows 10-style splash screen I’m using in an implementation of Windows as a Service with SCCM (aka in-place upgrade), and a couple of people asked for the code, so here it is!

A while ago a blogged about a custom splash screen I created to use during the Windows 10 upgrade process. Since then, I’ve seen some modifications of it out there, including that of Gary Blok, where he added the Windows Setup percent complete which I quite liked. So I made a few changes to the original code as follows:

  • Added a progress bar and percentage for the Windows Setup percent complete
  • Added a timer so the user knows how long the upgrade has been running
  • Prevent the monitors from going to sleep while the splash screen is displayed
  • Added a simple way to close the splash screen in a failure scenario by setting a task sequence variable
  • Re-wrote the WPF part into XAML code

Another change is that I call the script with ServiceUI.exe from the MDT toolkit instead of via the Invoke-PSScriptasUser.ps1 as this version needs to read task sequence variables so must run in the same context as the task sequence.

I haven’t added things like looping the text, or adding TS step names as I prefer not to do that, but check out Gary’s blog if you want to know how.

To use this version, download the files from my Github repo. Make sure you download the v2 edition. Grab the ServiceUI.exe from an MDT installation and add it at top-level (use the x64 version of ServiceUI.exe if you are deploying 64-bit OS). Package these files in a package in SCCM – no program needed.

To call the splash screen, add a Run Command Line step to your upgrade task sequence and call the main script via Service UI, referencing the package:

ServiceUI.exe -process:Explorer.exe %SYSTEMROOT%\System32\WindowsPowershell\v1.0\powershell.exe -NoProfile -WindowStyle Hidden -ExecutionPolicy Bypass -File "Show-OSUpgradeBackground.ps1"

To close the screen in a failure scenario, I add 3 steps as follows:

The first step kills the splash screen simply by setting the task sequence variable QuitSplashing to True. The splash screen code will check for this variable and initiate closure of the window when set to True.

The second step just runs a PowerShell script to wait 5 seconds for the splash screen to close

The last step restores the taskbar to the screen

For that step, run the following PowerShell code:

# Thanks to
$Source = @"
using System;
using System.Runtime.InteropServices;

public class Taskbar
    private static extern int FindWindow(string className, string windowText);
    private static extern int ShowWindow(int hwnd, int command);

    private const int SW_HIDE = 0;
    private const int SW_SHOW = 1;

    protected static int Handle
            return FindWindow("Shell_TrayWnd", "");

    private Taskbar()
        // hide ctor

    public static void Show()
        ShowWindow(Handle, SW_SHOW);

    public static void Hide()
        ShowWindow(Handle, SW_HIDE);
Add-Type -ReferencedAssemblies 'System', 'System.Runtime.InteropServices' -TypeDefinition $Source -Language CSharp

# Restore the taskbar

13 thoughts on “Windows 10 Upgrade Splash Screen – Take 2

  1. Hi, I have been unable to get this to run without crashing on Win 10 1903. The screen runs for about 7 seconds then crashes out. This happens regardless of running the scripts directly or if I run it from a task sequence.

  2. Can this run after a reboot on the lock screen or does it still require to be run in User context (only when user in logged in) Thanks

  3. does this still work with 1909 upgrade ? script seems to run for a few seconds then just closes. TS keeps running

  4. Hi

    Im not quite sure what has happened, but now when I run this in my IPU TS, the TS progress window put itself over the Splashscreen. I can click the background and it will hide the progresswindow, However, each update will bring it to the front again.

    Im sure when I tested this a month ago, this wasnt the case. Any idea what might be wrong here?

    1. Did anyone figure out a fix for this? I still keep getting the TS Progress Box on top of the splash screen.

  5. this is pretty cool, and i have developed my own front end similar to this one. i have been looking for some info on how to get the 2nd bar action info either from powershell or WMI to be able to display that info in a custom GUI. onevinn osbackground actually does this, but have not been able to find any info on how to accomplish this to use in my custom GUI. the sub action info is info that is provided and not assigned to a variable like the 1st line is. does anyone have any info or can point me in the right direction to be able to get that info?

  6. any way for this to “regain focus” – On Windows 11 the start menu opens automatically after OOBE, and thus covers up the splash screen ( using part of your splash screen code for a similar project around autopilot)

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.