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 +