bug: check for existence of install.wim on target
This commit is contained in:
parent
07adefd358
commit
f347611794
@ -1,12 +1,10 @@
|
|||||||
@echo off
|
@echo off
|
||||||
set T=c:\temp
|
|
||||||
set W10=c:\TEMP\W10
|
set W10=c:\TEMP\W10
|
||||||
set SOURCES=%W10%\sources
|
set SOURCES=%W10%\sources
|
||||||
set BOOTFILE=boot.wim
|
set BOOTFILE=boot.wim
|
||||||
set IMAGEFILE=install.wim
|
set IMAGEFILE=install.wim
|
||||||
set SCRIPT_SETTINGS=scripts\settings.cmd
|
set SCRIPT_SETTINGS=scripts\settings.cmd
|
||||||
set COMPANY_SETTINGS=company\settings.cmd
|
set COMPANY_SETTINGS=company\settings.cmd
|
||||||
set FOURGB=4294967296
|
|
||||||
|
|
||||||
IF %1.==. GOTO USAGE
|
IF %1.==. GOTO USAGE
|
||||||
|
|
||||||
@ -31,27 +29,14 @@ if NOT EXIST %DRIVE% (
|
|||||||
echo using drive [ %DRIVE% ] ...
|
echo using drive [ %DRIVE% ] ...
|
||||||
echo.
|
echo.
|
||||||
|
|
||||||
rem get drive type (is it fat32 ?) ...
|
|
||||||
for /f "tokens=5" %%A in ('@fsutil fsinfo volumeinfo %DRIVE%^|findstr /B "File System Name : "') do (@set DRIVETYPE=%%A)
|
|
||||||
echo DRIVETPYE = [ %DRIVETYPE% ]
|
|
||||||
|
|
||||||
rem check SOURCE for files LARGER 4 GB in case FAT32 was chosen ...
|
|
||||||
if /i "%DRIVETYPE%" EQU "fat32" (
|
|
||||||
for /f "tokens=*" %%F in ('"dir /S /B /A-D %W10%"') do if %%~zF GTR %FOURGB% (
|
|
||||||
echo ERROR: The file [ %%F : %%~zF bytes ] is greater than 4GB in size - cannot copy this to a FAT32 filesystem!
|
|
||||||
exit /b
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
if NOT EXIST %SOURCES%\%BOOTFILE% (
|
if NOT EXIST %SOURCES%\%BOOTFILE% (
|
||||||
echo DOH! no %BOOTFILE% in [ %SOURCES% ] found
|
echo DOH! no %BOOTFILE% in [ %SOURCES% ] found
|
||||||
exit /b
|
exit /b
|
||||||
)
|
)
|
||||||
|
|
||||||
if NOT EXIST %SOURCES%\%IMAGEFILE% (
|
if NOT EXIST %SOURCES%\%IMAGEFILE% (
|
||||||
echo DOH! no %IMAGE% in [ %SOURCES% ] found
|
echo DOH! no %IMAGEFILE% in [ %SOURCES% ] found
|
||||||
exit /b
|
exit /b
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
rem =====
|
rem =====
|
||||||
@ -61,6 +46,13 @@ rem =====
|
|||||||
echo copying all files in [ %W10% ] to drive %DRIVE% ...
|
echo copying all files in [ %W10% ] to drive %DRIVE% ...
|
||||||
robocopy %W10%\ %DRIVE% /MIR /256 /NDL /R:1 /J /XX
|
robocopy %W10%\ %DRIVE% /MIR /256 /NDL /R:1 /J /XX
|
||||||
|
|
||||||
|
rem check for existence of install.wim in case FAT32 was chosen ...
|
||||||
|
if NOT EXIST %DRIVE%\sources\%IMAGEFILE% (
|
||||||
|
echo ERROR ON COPY: no %IMAGEFILE% in [ %DRIVE%\sources\%IMAGEFILE% ] found!
|
||||||
|
echo HINT: FAT32 cannot handle files larger 4 GB!
|
||||||
|
exit /b
|
||||||
|
)
|
||||||
|
|
||||||
:CONT
|
:CONT
|
||||||
if EXIST tools (
|
if EXIST tools (
|
||||||
echo.
|
echo.
|
||||||
|
Loading…
Reference in New Issue
Block a user