It's clear to me Looks like my powershell trick to remove packages, but via cmd. There's some very recognizable abbodi1406's script style in-there so it might look a bit intimidating. delMicron might have missed something when he adapted it, but otherwise solid! I would do it in powershell from start to end tho, since it still getting used, but inefficiently, spanning multiple processes. Only trouble is the dinosaurs do not like powershell, and prefer to stick with their antiqued guns
Its a very easy task to remove LCU or SSU directly without making the component package visible & removing its owner dependency cuz these are already visible in a offline image if we run pwsh getwindowspackage pipeline ogv - passthru pipeline removewindowspackage . whats the use of going through this process if packages are already visible in pwsh gui removal window Hint : This script will work where we are not able to see the component packages like EDGE Chromium & OneDrive etc etc ........ Pl cross check
Could you share detailed info about "pwsh getwindowspackage pipeline ogv - passthru pipeline removewindowspackage"?
Are you sure that you are using the same image version? With the original build that's rigth, that batch will fail and the package will not removed. Sorry....
You're right, I learn so much from yours and abbodi1406's perfect script and some google search, and I try to adopt it to adjust with the needs.
Powershell -C "Get-WindowsPackage -Path 'Mount' | OGV -PassThru -Title 'Select Windows Packages to Remove' | Remove-WindowsPackage -Path 'Mount' -Verbose" Here 'Mount' is Mounted Path of Image as i use "SetLocal EnableDelayedExpansion" then "cd /d %~dp0" in first after @echo off theres no need to set path on mounted image as everything is done within project directory where the main script exists. Give it a try & you will see all updates including SSU & LCU in grid view output list.
Much appreciated. But I am really bad at PowerShell. It's OK. I can use the way I am used to. Thanks.
Thank you. Here is the one I am happy with: Code: if exist temp\1.txt del /f /q temp\1.txt if exist %MT%\Windows\servicing\Packages\Package_for_*.mum dir /b %MT%\Windows\servicing\Packages\Package_for_*.mum >>temp\1.txt if exist temp\1.txt ( for /f %%x in ('findstr /i "ServicingStack" temp\1.txt 2^>nul') do powershell -Command "(gc %MT%\Windows\servicing\Packages\%%x) -replace 'permanent', 'removable' | sc %MT%\Windows\servicing\Packages\%%x" powershell -Command "(gc temp\1.txt) -replace '.mum', '' | sc temp\1.txt" for /f %%x in ('findstr /i . temp\1.txt 2^>nul') do if exist %MT%\Windows\servicing\Packages\%%x.mum ( reg load HKLM\SOFTWARE1 %MT%\Windows\System32\config\SOFTWARE >nul reg add "HKLM\SOFTWARE1\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages\%%x" /v Visibility /t REG_DWORD /d 1 /f >NUL 2>&1 reg delete "HKLM\SOFTWARE1\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages\%%x\Owners" /f >NUL 2>&1 reg unload HKLM\SOFTWARE1 >nul echo. echo ------------------------------------------------------------ echo Removing %%x echo ------------------------------------------------------------ dism /english /image:%MT% /Remove-package /Packagename:%%x ) ) Code: ------------------------------------------------------------ Removing Package_for_DotNetRollup~31bf3856ad364e35~amd64~~10.0.4400.1 ------------------------------------------------------------ Deployment Image Servicing and Management tool Version: 10.0.19041.746 Image Version: 10.0.19041.1 Processing 1 of 1 - Removing package Package_for_DotNetRollup~31bf3856ad364e35~amd64~~10.0.4400.1 [==========================100.0%==========================] The operation completed successfully. ------------------------------------------------------------ Removing Package_for_KB5003791~31bf3856ad364e35~amd64~~19041.1237.1.3 ------------------------------------------------------------ Deployment Image Servicing and Management tool Version: 10.0.19041.746 Image Version: 10.0.19041.1 Processing 1 of 1 - Removing package Package_for_KB5003791~31bf3856ad364e35~amd64~~19041.1237.1.3 [==========================100.0%==========================] The operation completed successfully. ------------------------------------------------------------ Removing Package_for_RollupFix~31bf3856ad364e35~amd64~~19041.1415.1.6 ------------------------------------------------------------ Deployment Image Servicing and Management tool Version: 10.0.19041.746 Image Version: 10.0.19041.1 Processing 1 of 1 - Removing package Package_for_RollupFix~31bf3856ad364e35~amd64~~19041.1415.1.6 [==========================100.0%==========================] The operation completed successfully. ------------------------------------------------------------ Removing Package_for_ServicingStack_1371~31bf3856ad364e35~amd64~~19041.1371.1.0 ------------------------------------------------------------ Deployment Image Servicing and Management tool Version: 10.0.19041.746 Image Version: 10.0.19041.1 Processing 1 of 1 - Removing package Package_for_ServicingStack_1371~31bf3856ad364e35~amd64~~19041.1371.1.0 [==========================100.0%==========================] The operation completed successfully. ------------------------------------------------------------ Removing Package_for_ServicingStack~31bf3856ad364e35~amd64~~19041.1220.1.0 ------------------------------------------------------------ Deployment Image Servicing and Management tool Version: 10.0.19041.746 Image Version: 10.0.19041.1 Processing 1 of 1 - Removing package Package_for_ServicingStack~31bf3856ad364e35~amd64~~19041.1220.1.0 [==========================100.0%==========================] The operation completed successfully. PS: It works only when the image base has not been resetted. Otherwise: Code: Deployment Image Servicing and Management tool Version: 10.0.19041.844 Image Version: 10.0.19041.1415 Processing 1 of 1 - Removing package Package_for_RollupFix~31bf3856ad364e35~amd64~~19041.1415.1.6 [==========================100.0%==========================] An error occurred - Package_for_RollupFix Error: 0x800f0905 Error: 0x800f0905 DISM failed. No operation was performed. For more information, review the log file.
I have quitted recontructing such an image for following reasons: 1. It creates barebone system only. 2. It can be installed from iso boot only. 3. It always prompts license terms not found at OOBE phase.
I have no further researching about that since I had quitted on it. You can search or PM example12345678912345678 for 19100.1051.210916-1011.VB_RELEASE_SVC_TEAM_FLIGHT_CLIENTUNSTAGED_RETAIL_X64FRE_EN-US.ISO.
@example12345678912345678 Could you please tell me how can I stage the 19100.1051.210916-1011.VB_RELEASE_SVC_TEAM_FLIGHT_CLIENTUNSTAGED_RETAIL_X64FRE_EN-US.ISO using DISM and/or pkgmgr?
I actually don't know how to convert an unstaged ISO to staged or backwards. The best thing I can tell is this: 1. Create a virtual machine with any settings but the virtual disk type must be .VHD in VirtualBox, so you can mount it. 2. Install the OS normally. 3. Open command prompt under elevated privileges and run this command on VM: Code: Sysprep.exe /generalize /oobe /shutdown 4. Mount VHD and capture the image file either via this DISM command or using third party GUI software: Code: DISM /capture-image /imagefile:<Full path>\install.wim /CaptureDir:<The volume letter of mounted drive>:\ /Name:"<OS Name>" 5. Dismount the drive. 6. If you're going to convert multiple images, then you have to repeat the steps 2-5 for each edition. 7. Use any ISO editor to replace install.wim file in "<Root>\sources\" folder. P.S: PM me if you want the ISO link since it's against the rules to share homebrew ISOs.