added 4GB check for FAT32 filesystem!
This commit is contained in:
parent
62a90bc3bf
commit
a68231ace9
@ -31,7 +31,7 @@ echo mounting disk image (iso) with powershell ...
|
||||
for /f %%i in ('"powershell $diskImage=Mount-DiskImage -ImagePath %ISOFILE% -NoDriveLetter; write-host $diskImage.DevicePath"') do @set DEVICEPATH=%%i
|
||||
|
||||
echo copying files from image to targetpath %W10% ...
|
||||
robocopy %DEVICEPATH% %W10% /MIR /256 /NFL /NDL /R:0
|
||||
robocopy %DEVICEPATH% %W10% /MIR /256 /NFL /NDL /R:1
|
||||
|
||||
echo unmounting disk image (iso) ...
|
||||
powershell Dismount-Diskimage -ImagePath %ISOFILE%
|
||||
|
@ -1,6 +1,6 @@
|
||||
@echo off
|
||||
set ARG1=null
|
||||
set NTLITE="%ProgramFiles%\NTLite\NTLite.exe"
|
||||
set NTLITE="%ProgramFiles%\NTLite\NTLite.ex"
|
||||
set SOURCES=c:\TEMP\W10\sources
|
||||
set IMAGEFILE=install.wim
|
||||
set T=c:\temp
|
||||
|
@ -48,7 +48,8 @@ set FS=
|
||||
echo.
|
||||
set /p FS="Please select filesystem (exfat or fat32) [exfat]: "
|
||||
if /i "%FS%" EQU "fat32" (
|
||||
echo IMPORTANT: maximum size for FAT32 is 32768!
|
||||
echo IMPORTANT: maximum partition size for FAT32 is 32768!
|
||||
echo maximum filesize for FAT32 is 4GB!
|
||||
GOTO CONT2
|
||||
)
|
||||
if /i "%FS%" EQU "exfat" (
|
||||
|
@ -7,6 +7,7 @@ set IMAGEFILE=install.wim
|
||||
set SCRIPT_SETTINGS=scripts\settings.cmd
|
||||
set COMPANY_SETTINGS=company\settings.cmd
|
||||
set LANG=en-US
|
||||
set FOURGB=4294967296
|
||||
set MYUSER=
|
||||
set MYNAME=
|
||||
set MYPASS=
|
||||
@ -51,7 +52,12 @@ if NOT EXIST %USBDRIVE% (
|
||||
exit /b
|
||||
)
|
||||
|
||||
echo using drive %USBDRIVE% ...
|
||||
echo using drive [ %USBDRIVE% ] ...
|
||||
echo.
|
||||
|
||||
rem get drive type (is it fat32 ?) ...
|
||||
for /f "tokens=5" %%A in ('@fsutil fsinfo volumeinfo %USBDRIVE%^|findstr /B "File System Name : "') do (@set DRIVETYPE=%%A)
|
||||
echo INFO: DRIVETPYE = [ %DRIVETYPE% ]
|
||||
|
||||
rem =====
|
||||
rem MAIN
|
||||
@ -65,6 +71,14 @@ echo - use "fat32" for UEFI based installations only!
|
||||
echo REASON: UEFI cannot read "exfat" filesystems and Windows setup will throw error code: 0x80042565
|
||||
echo.
|
||||
|
||||
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 GEQ %FOURGB% (
|
||||
echo ERROR: The file [ %%F ] is greater than 4GB in size, cannot copy this to a FAT32 filesystem!
|
||||
exit /b
|
||||
)
|
||||
)
|
||||
|
||||
set answer=B
|
||||
:ask
|
||||
set /p answer="BIOS(default) or UEFI setup (B/U)? "
|
||||
@ -130,21 +144,20 @@ if EXIST %T%\%IMAGEFILE% (
|
||||
)
|
||||
|
||||
echo copying all files in [ %W10% ] to drive %USBDRIVE% ...
|
||||
robocopy %W10%\ %USBDRIVE% /MIR /256 /NDL /R:0 /J /XX || exit /b
|
||||
robocopy %W10%\ %USBDRIVE% /MIR /256 /NDL /R:1 /J /XX
|
||||
|
||||
:CONT
|
||||
if EXIST tools (
|
||||
echo.
|
||||
echo copying folder [ tools ] to drive %USBDRIVE% ...
|
||||
robocopy tools %USBDRIVE%\tools /COPY:DT /FFT /XO /256 /NJH /NJS /NDL ^
|
||||
/R:0 /XF .gitignore || exit /b
|
||||
robocopy tools %USBDRIVE%\tools /COPY:DT /FFT /XO /256 /NJH /NJS /NDL /R:1 /XF .gitignore
|
||||
)
|
||||
|
||||
if EXIST software (
|
||||
echo.
|
||||
echo copying folder [ software ] to %USBDRIVE%\tools ...
|
||||
robocopy software %USBDRIVE%\tools\software /COPY:DT /FFT /XO /MIR /256 /NJH /NJS /NDL /R:0 ^
|
||||
/XF *.iso /XF *.txt /XF *.cmd /XF *.csv /XF .gitignore /XD .git || exit /b
|
||||
robocopy software %USBDRIVE%\tools\software /COPY:DT /FFT /XO /MIR /256 /NJH /NJS /NDL /R:1 ^
|
||||
/XF *.iso /XF *.txt /XF *.cmd /XF *.csv /XF .gitignore /XD .git
|
||||
)
|
||||
|
||||
for %%P in (drivers scripts source optional personal company apps) do (
|
||||
@ -152,7 +165,7 @@ for %%P in (drivers scripts source optional personal company apps) do (
|
||||
echo.
|
||||
echo copying folder [ %%P ] to %USBDRIVE%\tools ...
|
||||
robocopy %%P %USBDRIVE%\tools\%%P /COPY:DT /FFT /XO /MIR /256 /NJH /NJS /NDL ^
|
||||
/R:0 /XF .gitignore /XD .git || exit /b
|
||||
/R:1 /XF .gitignore /XD .git
|
||||
)
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user