From 070d7a3c207dac913b5365a31a74e745b3d50b71 Mon Sep 17 00:00:00 2001 From: "Michael H.G. Schmidt" Date: Sun, 20 Dec 2020 18:37:15 +0100 Subject: [PATCH] . --- wimscripts/cleanup-wim.cmd | 11 +++++++++++ wimscripts/mount-wim.cmd | 7 +++++-- wimscripts/umount-wim.cmd | 5 +++++ 3 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 wimscripts/cleanup-wim.cmd create mode 100644 wimscripts/umount-wim.cmd diff --git a/wimscripts/cleanup-wim.cmd b/wimscripts/cleanup-wim.cmd new file mode 100644 index 0000000..77c1901 --- /dev/null +++ b/wimscripts/cleanup-wim.cmd @@ -0,0 +1,11 @@ +set SOURCES="c:\TEMP\Win10\sources" +set MNT="c:\TEMP\WIM" + +dism /Image:%MNT% /Cleanup-Image /StartComponentCleanup /ResetBase +dism /Unmount-Wim /MountDir:%MNT% /Commit + +dism /Compress:max /Export-Image ^ + /SourceImageFile:%SOURCES%\install.wim ^ + /Name:"Windows 10 Pro N" ^ + /DestinationImageFile:%SOURCES%\install_CLEAN.wim + diff --git a/wimscripts/mount-wim.cmd b/wimscripts/mount-wim.cmd index 86d5f3c..7e708d8 100644 --- a/wimscripts/mount-wim.cmd +++ b/wimscripts/mount-wim.cmd @@ -1,3 +1,6 @@ -mkdir C:\WIM -dism /Mount-Wim /WimFile:install.wim /Name:"Windows 10 Pro N" /MountDir:C:\wim +set SOURCES="c:\TEMP\Win10\sources" +set MNT="c:\TEMP\WIM" + +mkdir %MNT% +dism /Mount-Wim /WimFile:%SOURCES%\install.wim /Name:"Windows 10 Pro N" /MountDir:%MNT% diff --git a/wimscripts/umount-wim.cmd b/wimscripts/umount-wim.cmd new file mode 100644 index 0000000..a9df6a4 --- /dev/null +++ b/wimscripts/umount-wim.cmd @@ -0,0 +1,5 @@ +set SOURCES="c:\TEMP\Win10\sources" +set MNT="c:\TEMP\WIM" + +dism /Unmount-Wim /MountDir:%MNT% /Discard +