If you are building a reference image in a VM, you want it to be as clean as possible before running sysprep /generalize. Using install-wim-tweak.exe before sysprep ensures that the unwanted components never appear on deployed machines.
Works on mounted images but fails for protected packages:
Get-AppxProvisionedPackage -Path C:\mount | Where-Object $_.DisplayName -like "*xbox*" | Remove-AppxProvisionedPackage
Always keep the original install.wim before tweaking. You can also use DISM to export a modified image as a new file:
dism /export-image /sourceimagefile:C:\win11_tweaked.wim /sourceindex:1 /destinationimagefile:C:\win11_clean.wim /compress:max
The tool works by manipulating the Windows Component-Based Servicing (CBS) database (located at C:\Windows\WinSxS\). It uses a specific command to change a package's visibility from "visible" to "hidden" (or vice versa). install-wim-tweak.exe
Key Command (The most famous one):
install-wim-tweak.exe /p <Path-to-Mounted-Image> /c "Microsoft-Windows-Internet-Browser-Package" /r
(This is a simplified example; the exact package names vary by Windows version.)
More commonly used commands:
List all Appx packages in a mounted offline image:
install-wim-tweak.exe /o /l /appx
Mark OneDrive as uninstallable in offline image:
install-wim-tweak.exe /o /c Microsoft.OneDrive.Sync /u
Remove all Xbox-related apps from a live system: If you are building a reference image in
install-wim-tweak.exe /u *xbox*
install-wim-tweak.exe /r *xbox*
install-wim-tweak.exe is a piece of Windows customization history. It remains the only free tool that can truly disable the most stubborn built-in apps without resorting to manual registry digging. For deployment techs managing legacy environments (Windows 10 LTSC, Windows 8.1 Embedded), it's still invaluable.
But on modern systems, its glory days are fading. Microsoft's transition to Windows Feature Experience Packs and Windows Update compliance checks means that a component removed today may break tomorrow's patch. If you need reliable, production-safe customization, invest in NTLite or master Microsoft's own DISM /Remove-Capability (which only removes optional features, not protected apps).
Final verdict: Use install-wim-tweak.exe as a learning tool or a one-time debloater on a non-critical machine. For enterprise, create a detailed deployment checklist using supported methods. And always, always back up your data first. Works on mounted images but fails for protected