for_removal.cmd [Last edit, updated for_removal.cmd] Code: @echo off set mountdir=c:\mount setlocal enabledelayedexpansion reg load HKLM\SOFTWAR !MOUNTDIR!\Windows\System32\config\SOFTWARE for %%0 in ( OneDrive ) do ( PowerShell -C "SP -Path 'HKLM:\SOFTWAR\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages\*%%0*' -Name Visibility -Value 1 -Force -EA 0" PowerShell -C "SP -Path 'HKLM:\SOFTWAR\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages\*%%0*' -Name DefVis -Value 2 -Force -EA 0" PowerShell -C "RD -Path 'HKLM:\SOFTWAR\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages\*%%0*' -Include *Owner* -Recurse -Force -EA 0" PowerShell -C "Get-ChildItem -Path 'HKLM:\SOFTWAR\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages\*%%0*' -Name | "clip" | notepad.exe for_removal.cmd | reg unload HKLM\SOFTWAR" reg unload HKLM\SOFTWAR cls ) for %%0 in ( ) do ( dism /image:!MOUNTDIR! /remove-package /packagename:"%%0" ) echo off | clip endlocal pause HOW: Code: Run for_removal.cmd as Administrator, when for_removal.cmd pops open. Goto ) for %%0 in ( Select Paste Here - Close and Save for_removal.cmd ) do ( dism /image:!MOUNTDIR! /remove-package /packagename:"%%0" Results: Code: The operation completed successfully. Deployment Image Servicing and Management tool Version: 10.0.19041.1 Image Version: 10.0.19041.1 Processing 1 of 1 - Removing package Microsoft-Windows-OneDrive-Setup-Package~31bf3856ad364e35~amd64~en-US~10.0.19041.1 [==========================100.0%==========================] The operation completed successfully. Deployment Image Servicing and Management tool Version: 10.0.19041.1 Image Version: 10.0.19041.1 Processing 1 of 1 - Removing package Microsoft-Windows-OneDrive-Setup-Package~31bf3856ad364e35~amd64~~10.0.19041.1 [==========================100.0%==========================] The operation completed successfully. Deployment Image Servicing and Management tool Version: 10.0.19041.1 Image Version: 10.0.19041.1 Processing 1 of 1 - Removing package Microsoft-Windows-OneDrive-Setup-WOW64-Package~31bf3856ad364e35~amd64~en-US~10.0.19041.1 [==========================100.0%==========================] The operation completed successfully. Deployment Image Servicing and Management tool Version: 10.0.19041.1 Image Version: 10.0.19041.1 Processing 1 of 1 - Removing package Microsoft-Windows-OneDrive-Setup-WOW64-Package~31bf3856ad364e35~amd64~~10.0.19041.1 [==========================100.0%==========================] The operation completed successfully.
Checksums + Mirrors: https://forums.mydigitallife.net/th...c-beta-channel-ni_release.85327/#post-1734516
Hi. Does anyone know why the UWP SecHealthUI & AppInstaller cannot be removed from the mounted windows 11 image? there will be an error. But if you remove AppInstaller from under windows 10, then everything is deleted well.
removing packages from the offline image, without the full package name. (analog of use install_wim_tweak.exe) Code: Dism /Mount-Wim /WimFile:C:\WORK\install.wim /index:4 /MountDir:C:\WORK\Mount Reg load HKLM\Custom C:\WORK\Mount\Windows\System32\Config\Software Powershell "SP 'HKLM:\Custom\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages\*OneDrive*' Visibility -V 1" Powershell "RD 'HKLM:\Custom\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages\*OneDrive*' -Include Owners -Recurse" for /f "tokens=8 delims=\" %%I in ('reg query "HKLM\Custom\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages" /f OneDrive') do call:VAR %%I Reg unload HKLM\Custom for %%I in (%Packs%) do Dism /image:C:\WORK\Mount /Remove-Package /PackageName:%%I Dism /Unmount-Wim /MountDir:C:\WORK\Mount /commit :VAR set Packs=%Packs% %~1 exit /b