Skip to content

Instantly share code, notes, and snippets.

@allenyllee
Last active July 13, 2016 02:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save allenyllee/0f1458dd6f3699c027ff9ba408d3ba5d to your computer and use it in GitHub Desktop.
Save allenyllee/0f1458dd6f3699c027ff9ba408d3ba5d to your computer and use it in GitHub Desktop.
#There are some useful batch files.

#There are some useful batch files.

@ECHO OFF
:sku_selection
Set PROJECT=
ECHO Which PROJECT do you want to sign?
ECHO 1. D17
ECHO 2. D15
ECHO 3. E15
Set /p PROJECT=Please type the number:
if "%PROJECT%" == "1" goto D17
if "%PROJECT%" == "2" goto D15
if "%PROJECT%" == "3" goto E15
:D17
set SKU=D17
goto exec
:D15
set SKU=D15
goto exec
:E15
set SKU=E15
goto exec
:exec
xcopy /y Unsigned\*.efi %SKU%\*.efi
for /f "eol= tokens=1" %%i in ('dir /b %SKU%\*.efi') do (
cd SignTool\X64\
IF "%%i"=="H2OFFT-Sx64.efi" (
echo ==================
echo Use Insyde Sign tool.
echo ==================
iEFIFlashSigner.exe signefi -n Pegatron_%SKU%_SecureFlash -in ..\..\%SKU%\%%i
echo[
) ELSE (
echo ==================
echo Use MS Sign tool.
echo ==================
signtool.exe sign /n Pegatron_%SKU%_SecureFlash ..\..\%SKU%\%%i
echo[
)
cd ..\..
)
goto end
:end
echo ==================
echo end of sign tool
echo ==================
echo[
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment