I want to chop off some features from the image to save some storage (especially helpful for VMs), but /Remove option for DISM /Disable-Feature won't work for Windows 10+ anymore as the official docs says: I've done some search, like this one (I tried, but didn't work for me): Also this question, but no answers yet: I'd like to hear some solutions from you, thanks!
Via NSudo Code: reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing" /v DisableRemovePayload /t REG_DWORD /d 0 /f
so <selection name="NetFx4" state="true"/> will cause it to be in the main package - foundation not just its own package and will remove the payload ty
Code: <update name="1d14113af8def40b5599b54d974b1e73"> <selectable disposition="absent"> <detectNone default="true"/> </selectable> <component> <assemblyIdentity name="Microsoft-Windows-SenseClient-Deployment" version="10.0.26063.1" processorArchitecture="amd64" language="neutral" buildType="release" publicKeyToken="31bf3856ad364e35" versionScope="nonSxS" /> <selection name="SenseClient" state="true"/> </component> </update> </package> </assembly> doesnt show in - dism /image:\ /get-features /format:Table Error when running with packagename Code: dism /image:o:\ /get-features /format:Table /packagename:Microsoft-Windows-SenseClient-Package~31bf3856ad364e35~amd64~~10.0.26063.1 Deployment Image Servicing and Management tool Version: 10.0.26040.1000 Image Version: 10.0.26063.1 An error occurred trying to open - Microsoft-Windows-SenseClient-Package~31bf3856ad364e35~amd64~~10.0.26063.1 Error: 0x800f080d Error: 0x800f080d after removing selection line - disabled, payload wasnt removed Code: O:\>dism /image:o:\ /disable-feature /packagename:Microsoft-Windows-SenseClient-Package~31bf3856ad364e35~amd64~~10.0.26063.1 /featurename:1d14113af8def40b5599b54d974b1e73 /remove Deployment Image Servicing and Management tool Version: 10.0.26040.1000 Image Version: 10.0.26063.1 Disabling feature(s) [==========================100.0%==========================] The operation completed successfully. O:\>dism /image:o:\ /get-features /format:Table /packagename:Microsoft-Windows-SenseClient-Package~31bf3856ad364e35~amd64~~10.0.26063.1 Deployment Image Servicing and Management tool Version: 10.0.26040.1000 Image Version: 10.0.26063.1 Features listing for package : Microsoft-Windows-SenseClient-Package~31bf3856ad364e35~amd64~~10.0.26063.1 -------------------------------- | -------- Feature Name | State -------------------------------- | -------- 1d14113af8def40b5599b54d974b1e73 | Disabled The operation completed successfully.
@LiteOS That's not the correct way the "selectable" block should be add to the parent package which install the package you want to remove e.g. EditionPack-Package