\\.\CDROM1 problem #78
This commit is contained in:
parent
97432458eb
commit
35c4847f2c
@ -1,6 +1,7 @@
|
||||
@echo off
|
||||
set T=c:\TEMP
|
||||
set W10=%T%\W10
|
||||
set ISODRIVE=Y:
|
||||
|
||||
IF %1.==. GOTO USAGE
|
||||
|
||||
@ -26,10 +27,10 @@ rd /S /Q %W10% 1>nul 2>nul
|
||||
mkdir %W10% 1>nul 2>nul
|
||||
|
||||
echo mounting disk image (iso) with powershell ...
|
||||
powershell Mount-DiskImage -ImagePath %ISOFILE%
|
||||
powershell "$diskImg = Mount-DiskImage -ImagePath %ISOFILE% -NoDriveLetter; $volInfo = $diskImg | Get-Volume; mountvol %ISODRIVE% $volInfo.UniqueId"
|
||||
|
||||
echo copying files from image to targetpath %W10% ...
|
||||
robocopy \\.\CDROM0 %W10% /MIR /256 /NFL /NDL /R:100
|
||||
robocopy %ISODRIVE%\ %W10% /MIR /256 /NFL /NDL /R:100
|
||||
|
||||
echo unmounting disk image (iso) ...
|
||||
powershell Dismount-Diskimage -ImagePath %ISOFILE%
|
||||
|
@ -1,5 +1,6 @@
|
||||
@echo off
|
||||
set COPY_IMAGE=null
|
||||
set ISODRIVE=Y:
|
||||
|
||||
IF %1.==. GOTO USAGE
|
||||
IF %2.==. GOTO USAGE
|
||||
@ -37,14 +38,14 @@ echo using drive %USBDRIVE% ...
|
||||
echo using image %ISOFILE% ...
|
||||
|
||||
echo mounting disk image (iso) with powershell ...
|
||||
powershell Mount-DiskImage -ImagePath %ISOFILE%
|
||||
powershell "$diskImg = Mount-DiskImage -ImagePath %ISOFILE% -NoDriveLetter; $volInfo = $diskImg | Get-Volume; mountvol %ISODRIVE% $volInfo.UniqueId"
|
||||
|
||||
if /I %COPY_IMAGE% == /W (
|
||||
echo copying ALL files including wim from ISO to targetpath %USBDRIVE% ...
|
||||
robocopy \\.\CDROM0 %USBDRIVE% /MIR /256 /NFL /NDL /R:10
|
||||
robocopy %ISODRIVE%\ %USBDRIVE% /MIR /256 /NFL /NDL /R:10
|
||||
) else (
|
||||
echo copying files from ISO WITHOUT wim to targetpath %USBDRIVE% ...
|
||||
robocopy \\.\CDROM0 %USBDRIVE% /MIR /256 /NFL /NDL /R:10 /XF *.wim
|
||||
robocopy %ISODRIVE%\ %USBDRIVE% /MIR /256 /NFL /NDL /R:10 /XF *.wim
|
||||
)
|
||||
|
||||
echo unmounting disk image (iso) ...
|
||||
|
Loading…
Reference in New Issue
Block a user