大网数据广告活动
启动与系统组件

Fix Black Screen After Running Sysprep as System on Windows 11 or Windows Server 2025

· 52CE 我爱测

Resolve black screen and missing GUI elements after running sysprep as System on Windows 11. Learn workarounds to register missing XAML packages.

Summary

This article applies to Windows 11 version 24H2 and 25H2, and Windows Server 2025. It describes a black screen problem or missing graphical user interface (GUI) elements in modern apps after running the System Preparation Tool (sysprep.exe) under the Local System account context. You often see the problem immediately after sign-in or after applying Windows updates.

Symptoms

You might encounter one or more of the following symptoms after deploying a Windows image and running sysprep.exe under the Local System account:

  • Black screen appears when signing in due to explorer.exe crashing.
  • Certain GUI elements in modern apps, such as the Settings app, fail to render.
  • The Start menu or other XAML-based apps close unexpectedly or fail to start.

These symptoms can occur immediately after first sign-in or later following Windows updates.

For documented conditions, see Sysprep (System Preparation) Overview | Microsoft Learn.

Cause: Running Sysprep as system

Running sysprep.exe under the Local System account isn't supported. This process skips AppX registration for certain XAML packages, causing failures in apps that depend on them, such as explorer.exe and the Settings app. Future Windows updates that modify these packages can also trigger the problem.

Older Windows versions aren't affected because they don't rely on these XAML AppX packages. Known cases include third-party automation solutions, such as VMware/Broadcom automation, that run Sysprep as system.

If you don't run Sysprep as system but the symptoms occur, other causes might be responsible. For additional causes and solutions, see KB5072911: Explorer, the Start menu, and other XAML-dependent apps might not start or close unexpectedly on some enterprise devices.

Solution 1: Manually register missing packages

IT administrators can manually register the missing packages in the user session and restart SiHost so Immersive Shell and related components recognize them. Run the following PowerShell commands:

Run the following PowerShell commands:

Add-AppxPackage -Register -Path "C:\\Windows\\SystemApps\\MicrosoftWindows.Client.CBS\_cw5n1h2txyewy\\appxmanifest.xml" -DisableDevelopmentMode
Add-AppxPackage -Register -Path "C:\\Windows\\SystemApps\\Microsoft.UI.Xaml.CBS\_8wekyb3d8bbwe\\appxmanifest.xml" -DisableDevelopmentMode

Add-AppxPackage -Register -Path "C:\\Windows\\SystemApps\\MicrosoftWindows.Client.Core\_cw5n1h2txyewy\\appxmanifest.xml" -DisableDevelopmentMode

After running these commands, restart SiHost or restart the device.

Solution 2: Logon script for non-persistent OS installations

For non-persistent environments, use a logon script to register the packages before explorer.exe launches. This approach ensures that the required packages are provisioned before the desktop loads.

Create a batch file wrapper with the following commands:

Run the sample PowerShell script on non-persistent OS installations

For non-persistent environments, a logon script approach remains the best option for IT administrators. Create a batch file wrapper to execute synchronously before Explorer launches.

Note: Deploy this script to run synchronously during user sign-in, blocking explorer.exe from starting until package registration completes.

@echo off 
REM Register MicrosoftWindows.Client.CBS 

powershell.exe -ExecutionPolicy Bypass -Command "Add-AppxPackage -Register -Path 'C:\Windows\SystemApps\MicrosoftWindows.Client.CBS_cw5n1h2txyewy\appxmanifest.xml' -DisableDevelopmentMode" 

REM Register Microsoft.UI.Xaml.CBS 

powershell.exe -ExecutionPolicy Bypass -Command "Add-AppxPackage -Register -Path 'C:\Windows\SystemApps\Microsoft.UI.Xaml.CBS_8wekyb3d8bbwe\appxmanifest.xml' -DisableDevelopmentMode" 

REM Register MicrosoftWindows.Client.Core 

powershell.exe -ExecutionPolicy Bypass -Command "Add-AppxPackage -Register -Path 'C:\Windows\SystemApps\MicrosoftWindows.Client.Core_cw5n1h2txyewy\appxmanifest.xml' -DisableDevelopmentMode" 

Determine the cause of the black screen problem

Source: Microsoft Learn / IT Pro troubleshooting by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / IT Pro troubleshooting
适用范围
- Supported versions of Windows Server - Supported versions of Windows Client · Source date 05/28/2026
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。