2017-11-22 08:40:21 +08:00
|
|
|
|
@echo off
|
|
|
|
|
color 1F
|
|
|
|
|
mode con lines=30 cols=90
|
|
|
|
|
rem <20><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
set "Oscdimg=%~sdp0Bin\%PROCESSOR_ARCHITECTURE%\oscdimg.exe"
|
|
|
|
|
set "DVD=%~1"
|
|
|
|
|
set "ISOLabel=%~2"
|
|
|
|
|
set "ISOFileName=%~3"
|
|
|
|
|
rem ѡ<><D1A1><EFBFBD><EFBFBD><EFBFBD>̾<EFBFBD><CCBE><EFBFBD>Ŀ¼
|
|
|
|
|
if "%DVD%" equ "" call :SelectFolder
|
|
|
|
|
set "BIOSBoot=%DVD%\boot\etfsboot.com"
|
|
|
|
|
set "UEFIBoot=%DVD%\efi\microsoft\boot\efisys.bin"
|
|
|
|
|
rem <20>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD>
|
|
|
|
|
call :MakeLabel %DVD%
|
|
|
|
|
if "%ISOFileName%" equ "" ( set "ISOFileName=%~dp0%ISOLabel%.iso" )
|
|
|
|
|
rem <20><><EFBFBD><EFBFBD>ei.cfg
|
|
|
|
|
if exist "%DVD%\sources\ei.cfg" del /f /q "%DVD%\sources\ei.cfg"
|
2018-05-11 18:39:03 +08:00
|
|
|
|
if exist "%DVD%\sources" (
|
2017-11-22 08:40:21 +08:00
|
|
|
|
echo.[EditionID]
|
|
|
|
|
echo.
|
|
|
|
|
echo.[Channel]
|
|
|
|
|
echo.OEM
|
|
|
|
|
echo.[VL]
|
|
|
|
|
echo.1
|
|
|
|
|
)>"%DVD%\sources\ei.cfg"
|
|
|
|
|
rem <20>ж<EFBFBD>UEFI<46><49><EFBFBD><EFBFBD>
|
|
|
|
|
if exist "%UEFIBoot%" (
|
2023-04-14 13:54:15 +08:00
|
|
|
|
"%Oscdimg%" -bootdata:2#p0,e,b"%BIOSBoot%"#pEF,e,b"%UEFIBoot%" -o -h -m -u2 -t%date:~5,2%/%date:~8,2%/%date:~0,4%,12:00:00 -l"%ISOLabel%" "%DVD%" "%ISOFileName%"
|
2018-05-11 18:39:03 +08:00
|
|
|
|
) else if exist "%BIOSBoot%" (
|
2023-04-14 13:54:15 +08:00
|
|
|
|
"%Oscdimg%" -bootdata:1#p0,e,b"%BIOSBoot%" -o -h -m -u2 -t%date:~5,2%/%date:~8,2%/%date:~0,4%,12:00:00 -l"%ISOLabel%" "%DVD%" "%ISOFileName%"
|
2018-05-11 18:39:03 +08:00
|
|
|
|
) else (
|
2023-04-14 13:54:15 +08:00
|
|
|
|
"%Oscdimg%" -o -h -m -u2 -t%date:~5,2%/%date:~8,2%/%date:~0,4%,12:00:00 -l"%ISOLabel%" "%DVD%" "%ISOFileName%"
|
2017-11-22 08:40:21 +08:00
|
|
|
|
)
|
|
|
|
|
goto :Exit
|
|
|
|
|
|
|
|
|
|
:SelectFolder
|
|
|
|
|
set folder=mshta "javascript:var folder=new ActiveXObject('Shell.Application').BrowseForFolder(0,'ѡ<><D1A1><EFBFBD><EFBFBD>װ<EFBFBD><D7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ¼', 513, '');if(folder) new ActiveXObject('Scripting.FileSystemObject').GetStandardStream(1).Write(folder.Self.Path);window.close();"
|
|
|
|
|
for /f "tokens=* delims=" %%f in ('%folder%') do set "DVD=%%f"
|
|
|
|
|
if "%DVD%" equ "" goto :Exit
|
|
|
|
|
goto :eof
|
|
|
|
|
|
|
|
|
|
:MakeLabel
|
|
|
|
|
if "%ISOLabel%" equ "" ( set "ISOLabel=%~n1" )
|
|
|
|
|
goto :eof
|
|
|
|
|
|
|
|
|
|
:Exit
|
|
|
|
|
if "%~1" equ "" pause
|