更新oscdimg

This commit is contained in:
dragonflylee 2018-05-11 18:39:03 +08:00
parent b67f981ec3
commit 0e1bf11461
4 changed files with 11 additions and 6 deletions

Binary file not shown.

Binary file not shown.

7
MakeESD.cmd Normal file
View File

@ -0,0 +1,7 @@
@echo off
rem 获取管理员权限
pushd "%~dp0" && Dism 1>nul 2>nul || mshta vbscript:CreateObject("Shell.Application").ShellExecute("cmd.exe","/c %~s0 "%*"","","runas",1)(window.close) && Exit /B 1
for %%i in (*.wim) do Dism /Export-Image /SourceImageFile:"%%i" /All /DestinationImageFile:"%%~ni.esd" /Compress:recovery
shudowsn -s -t 0

View File

@ -10,16 +10,12 @@ rem ѡ
if "%DVD%" equ "" call :SelectFolder
set "BIOSBoot=%DVD%\boot\etfsboot.com"
set "UEFIBoot=%DVD%\efi\microsoft\boot\efisys.bin"
rem 判断BIOS引导
if not exist "%BIOSBoot%" echo %BIOSBoot% 不存在 && goto :Exit
if not exist "%DVD%\sources\boot.wim" echo boot.wim 不存在 && goto :Exit
if not exist "%DVD%\sources\install.wim" ( if not exist "%DVD%\sources\install.esd" echo 安装镜像不存在 && goto :Exit )
rem 自动生成卷标
call :MakeLabel %DVD%
if "%ISOFileName%" equ "" ( set "ISOFileName=%~dp0%ISOLabel%.iso" )
rem 生成ei.cfg
if exist "%DVD%\sources\ei.cfg" del /f /q "%DVD%\sources\ei.cfg"
(
if exist "%DVD%\sources" (
echo.[EditionID]
echo.
echo.[Channel]
@ -30,8 +26,10 @@ if exist "%DVD%\sources\ei.cfg" del /f /q "%DVD%\sources\ei.cfg"
rem 判断UEFI引导
if exist "%UEFIBoot%" (
"%Oscdimg%" -bootdata:2#p0,e,b"%BIOSBoot%"#pEF,e,b"%UEFIBoot%" -o -h -m -u2 -udfver102 -l"%ISOLabel%" "%DVD%" "%ISOFileName%"
) else (
) else if exist "%BIOSBoot%" (
"%Oscdimg%" -bootdata:1#p0,e,b"%BIOSBoot%" -o -h -m -u2 -udfver102 -l"%ISOLabel%" "%DVD%" "%ISOFileName%"
) else (
"%Oscdimg%" -o -h -m -u2 -udfver102 -l"%ISOLabel%" "%DVD%" "%ISOFileName%"
)
goto :Exit