Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- cd /d "%~dp0"
- MD %~dp0mount
- echo Getting image info...
- dism /Get-ImageInfo /ImageFile:%~dp0install.wim
- pause
- dism /Mount-image /imagefile:%~dp0install.wim /Index:1 /MountDir:"%~dp0\mount"
- install_wim_tweak.exe /p "%~dp0\mount" /l
- echo Exported list of packages in the mounted image.
- pause
- echo Uninstalling packages...
- install_wim_tweak.exe /p "%~dp0\mount" /c "Windows-Defender" /r /n
- install_wim_tweak.exe /p "%~dp0\mount" /c "Microsoft-Windows-OneDrive" /r /n
- install_wim_tweak.exe /p "%~dp0\mount" /c "Microsoft-Windows-Skype" /r /n
- install_wim_tweak.exe /p "%~dp0\mount" /c "Microsoft-Xbox" /r /n
- install_wim_tweak.exe /p "%~dp0\mount" /c "Microsoft-OneCore-Gaming" /r /n
- install_wim_tweak.exe /p "%~dp0\mount" /c "Microsoft-OneCore-Indexer" /r /n
- install_wim_tweak.exe /p "%~dp0\mount" /c "Microsoft-Windows-RemoteDesktop" /r /n
- install_wim_tweak.exe /p "%~dp0\mount" /c "Microsoft-OneCore-RemoteDesktopServices" /r /n
- install_wim_tweak.exe /p "%~dp0\mount" /c "Microsoft-Windows-Geolocation" /r /n
- install_wim_tweak.exe /p "%~dp0\mount" /c "Microsoft-OneCore-Maps" /r /n
- install_wim_tweak.exe /p "%~dp0\mount" /c "Microsoft-Windows-Xps" /r /n
- install_wim_tweak.exe /p "%~dp0\mount" /c "Microsoft-Windows-Printing-XPSServices" /r /n
- install_wim_tweak.exe /p "%~dp0\mount" /c "Microsoft-Windows-ParentalControls" /r /n
- install_wim_tweak.exe /p "%~dp0\mount" /c "Microsoft-OneCore-AllowTelemetry" /r /n
- Dism /Unmount-Wim /MountDir:%~dp0mount /commit
- Dism /Export-Image /SourceImageFile:%~dp0install.wim /SourceIndex:1 /DestinationImageFile:%~dp0install_new.wim /Compress:max
- pause
- rmdir %~dp0mount
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement