2021-01-10 15:49:37 +01:00
|
|
|
@echo off
|
|
|
|
set T=c:\TEMP
|
|
|
|
set W10=%T%\W10
|
2023-01-12 15:28:17 +01:00
|
|
|
set DEVICEPATH=
|
2021-01-10 15:49:37 +01:00
|
|
|
|
2021-03-18 00:08:40 +01:00
|
|
|
IF %1.==. GOTO USAGE
|
|
|
|
|
2021-03-17 00:22:50 +01:00
|
|
|
echo ====================
|
|
|
|
echo Extract ISO file ...
|
|
|
|
echo ====================
|
2023-01-02 17:15:02 +01:00
|
|
|
echo.
|
2021-01-10 15:49:37 +01:00
|
|
|
|
|
|
|
rem get fullpath of isofile ...
|
|
|
|
set ISOFILE=%~f1
|
|
|
|
|
|
|
|
if NOT EXIST %ISOFILE% (
|
|
|
|
echo ERROR: file %ISOFILE% not found!
|
|
|
|
exit /b
|
|
|
|
)
|
|
|
|
|
|
|
|
rem =====
|
|
|
|
rem MAIN
|
|
|
|
rem =====
|
|
|
|
|
|
|
|
echo preparing %T% ...
|
|
|
|
mkdir %T% 1>nul 2>nul
|
|
|
|
rd /S /Q %W10% 1>nul 2>nul
|
|
|
|
mkdir %W10% 1>nul 2>nul
|
|
|
|
|
|
|
|
echo mounting disk image (iso) with powershell ...
|
2023-01-12 15:28:17 +01:00
|
|
|
for /f %%i in ('"powershell $diskImage=Mount-DiskImage -ImagePath %ISOFILE% -NoDriveLetter; write-host $diskImage.DevicePath"') do @set DEVICEPATH=%%i
|
2021-01-10 15:49:37 +01:00
|
|
|
|
|
|
|
echo copying files from image to targetpath %W10% ...
|
2023-02-08 22:48:50 +01:00
|
|
|
robocopy %DEVICEPATH% %W10% /MIR /256 /NFL /NDL /R:1
|
2021-01-10 15:49:37 +01:00
|
|
|
|
|
|
|
echo unmounting disk image (iso) ...
|
|
|
|
powershell Dismount-Diskimage -ImagePath %ISOFILE%
|
|
|
|
|
2023-01-02 17:15:02 +01:00
|
|
|
echo ======
|
|
|
|
echo READY.
|
|
|
|
echo ======
|
2023-01-16 22:25:41 +01:00
|
|
|
echo.
|
2023-01-02 17:15:02 +01:00
|
|
|
|
2021-01-10 15:49:37 +01:00
|
|
|
GOTO END
|
|
|
|
|
|
|
|
:USAGE
|
|
|
|
echo "usage: %0 <ISOFILE>"
|
|
|
|
|
|
|
|
:END
|
|
|
|
|