Guest User

install_wim_tweak.exe example script

a guest
May 7th, 2021
69
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @echo off
  2.  
  3. cd /d "%~dp0"
  4. MD %~dp0mount
  5.  
  6. echo Getting image info...
  7.  
  8. dism /Get-ImageInfo /ImageFile:%~dp0install.wim
  9. pause
  10.  
  11. dism /Mount-image /imagefile:%~dp0install.wim /Index:1 /MountDir:"%~dp0\mount"
  12.  
  13. install_wim_tweak.exe /p "%~dp0\mount" /l
  14. echo Exported list of packages in the mounted image.
  15. pause
  16.  
  17. echo Uninstalling packages...
  18.  
  19. install_wim_tweak.exe /p "%~dp0\mount" /c "Windows-Defender" /r /n
  20. install_wim_tweak.exe /p "%~dp0\mount" /c "Microsoft-Windows-OneDrive" /r /n
  21. install_wim_tweak.exe /p "%~dp0\mount" /c "Microsoft-Windows-Skype" /r /n
  22. install_wim_tweak.exe /p "%~dp0\mount" /c "Microsoft-Xbox" /r /n
  23. install_wim_tweak.exe /p "%~dp0\mount" /c "Microsoft-OneCore-Gaming" /r /n
  24. install_wim_tweak.exe /p "%~dp0\mount" /c "Microsoft-OneCore-Indexer" /r /n
  25. install_wim_tweak.exe /p "%~dp0\mount" /c "Microsoft-Windows-RemoteDesktop" /r /n
  26. install_wim_tweak.exe /p "%~dp0\mount" /c "Microsoft-OneCore-RemoteDesktopServices" /r /n
  27. install_wim_tweak.exe /p "%~dp0\mount" /c "Microsoft-Windows-Geolocation" /r /n
  28. install_wim_tweak.exe /p "%~dp0\mount" /c "Microsoft-OneCore-Maps" /r /n
  29. install_wim_tweak.exe /p "%~dp0\mount" /c "Microsoft-Windows-Xps" /r /n
  30. install_wim_tweak.exe /p "%~dp0\mount" /c "Microsoft-Windows-Printing-XPSServices" /r /n
  31. install_wim_tweak.exe /p "%~dp0\mount" /c "Microsoft-Windows-ParentalControls" /r /n
  32. install_wim_tweak.exe /p "%~dp0\mount" /c "Microsoft-OneCore-AllowTelemetry" /r /n
  33.  
  34. Dism /Unmount-Wim /MountDir:%~dp0mount /commit
  35. Dism /Export-Image /SourceImageFile:%~dp0install.wim /SourceIndex:1 /DestinationImageFile:%~dp0install_new.wim  /Compress:max
  36.  
  37. pause
  38. rmdir %~dp0mount
  39.  
RAW Paste Data