improvements

This commit is contained in:
Michael H.G. Schmidt 2023-01-02 11:12:06 +01:00
parent 3d156a9c95
commit 68e2b57e2c
3 changed files with 13 additions and 4 deletions

View File

@ -1,7 +1,9 @@
@echo off @echo off
set COPY_IMAGE=null
IF %1.==. GOTO USAGE IF %1.==. GOTO USAGE
IF %2.==. GOTO USAGE IF %2.==. GOTO USAGE
IF "%~3" NEQ "" set COPY_IMAGE=%3
echo. echo.
echo ==================== echo ====================
@ -37,8 +39,13 @@ echo using image %ISOFILE% ...
echo mounting disk image (iso) with powershell ... echo mounting disk image (iso) with powershell ...
powershell Mount-DiskImage -ImagePath %ISOFILE% powershell Mount-DiskImage -ImagePath %ISOFILE%
echo copying files from image to targetpath %USBDRIVE% ... if /I %COPY_IMAGE% == /W (
robocopy \\.\CDROM0 %USBDRIVE% /MIR /256 /NFL /NDL /R:10 /XF *.wim echo copying files from image to targetpath %USBDRIVE% ...
robocopy \\.\CDROM0 %USBDRIVE% /MIR /256 /NFL /NDL /R:10
) else (
echo copying files from image to targetpath %USBDRIVE% ...
robocopy \\.\CDROM0 %USBDRIVE% /MIR /256 /NFL /NDL /R:10 /XF *.wim
)
echo unmounting disk image (iso) ... echo unmounting disk image (iso) ...
powershell Dismount-Diskimage -ImagePath %ISOFILE% powershell Dismount-Diskimage -ImagePath %ISOFILE%
@ -52,7 +59,8 @@ rem =====
GOTO END GOTO END
:USAGE :USAGE
echo "usage: %0 <USBDRIVE> <ISOFILE>" echo "usage: %0 <USBDRIVE> <ISOFILE> [/w]"
echo /w = copy windows images to target
echo.
:END :END

View File

@ -14,6 +14,7 @@ for %%E in (
puttygen.exe puttygen.exe
rufus.exe rufus.exe
Windows-ISO-Downloader.exe Windows-ISO-Downloader.exe
MediaCreationTool20H2.exe
) do ( ) do (

Binary file not shown.