2021-01-10 15:49:37 +01:00
|
|
|
@echo off
|
|
|
|
set T=c:\TEMP
|
|
|
|
set W10=%T%\W10
|
2023-01-02 14:52:03 +01:00
|
|
|
set ISODRIVE=Y:
|
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 ====================
|
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-02 14:52:03 +01:00
|
|
|
powershell "$diskImg = Mount-DiskImage -ImagePath %ISOFILE% -NoDriveLetter; $volInfo = $diskImg | Get-Volume; mountvol %ISODRIVE% $volInfo.UniqueId"
|
2021-01-10 15:49:37 +01:00
|
|
|
|
|
|
|
echo copying files from image to targetpath %W10% ...
|
2023-01-02 14:52:03 +01:00
|
|
|
robocopy %ISODRIVE%\ %W10% /MIR /256 /NFL /NDL /R:100
|
2021-01-10 15:49:37 +01:00
|
|
|
|
|
|
|
echo unmounting disk image (iso) ...
|
|
|
|
powershell Dismount-Diskimage -ImagePath %ISOFILE%
|
|
|
|
|
2021-03-17 00:22:50 +01:00
|
|
|
echo READY.
|
|
|
|
echo.
|
|
|
|
|
2021-01-10 15:49:37 +01:00
|
|
|
rem =====
|
|
|
|
rem END
|
|
|
|
rem =====
|
|
|
|
GOTO END
|
|
|
|
|
|
|
|
:USAGE
|
|
|
|
echo "usage: %0 <ISOFILE>"
|
|
|
|
|
|
|
|
:END
|
|
|
|
|