echo -off
# Initial Setup for current working drive & Screen mode
#
mode 80 25
mode 100 31
mode 128 40
mode 160 53
mode 160 60
cls

if exist fs0:\STARTUP.NSH then
    fs0:
    set -v CTL_DRV fs0:
endif

if exist fs1:\STARTUP.NSH then
    fs1:
    set -v CTL_DRV fs1:
endif

if exist fs2:\STARTUP.NSH then
    fs0:
    set -v CTL_DRV fs2:
endif

if exist fs3:\STARTUP.NSH then
    fs1:
    set -v CTL_DRV fs3:
endif

if exist fs4:\STARTUP.NSH then
    fs0:
    set -v CTL_DRV fs4:
endif

if exist fs5:\STARTUP.NSH then
    fs1:
    set -v CTL_DRV fs5:
endif

set -v TEST_DRV %CTL_DRV%
set -v BOOTL EFI\BOOT
set -v MTSN MTMSN
set -v CBIOS LBIOS
set -v BIOS %MTSN%\BIOSID
set -v BMENU %MTSN%\BMENU
set -v Log %MTSN%\Help
set -v path %CTL_DRV%;%CTL_DRV%\%MTSN%;%CTL_DRV%\%MTSN%\Help;%CTL_DRV%\%MTSN%\ThinkPad;%CTL_DRV%\%BIOS%;%CTL_DRV%\gku1tools;%CTL_DRV%\LDIAG;

cls
cd %MTSN%\%MTSNTool%

# WMBID for L370 Gaming 3 15IAH7
BIOSID.efi /SC "JMCN" %BIOSVERSION%
if %lasterror% == 0 then
  if %MBID% == D3 then
    goto PASS
  endif
  if %MBID% == 1B then
    goto PASS
  endif
  if %MTCODE% == 38325339 then
    goto PASS
  endif

  if %MTCODE% == 38325342 then 
    uRWEEPROM.EFI /w 7 E0 E0 E3
  endif

  if %MTCODE% == 38325343 then
    uRWEEPROM.EFI /w 7 E0 E0 F3
  endif

  if %MTCODE% == 38325341 then
    if %MBID% == 0B then
      uRWEEPROM.EFI /w 7 E0 E0 1B
    endif

    if %MBID% == C3 then
      uRWEEPROM.EFI /w 7 E0 E0 D3
    endif
  endif

:PASS
  set -d MBID
  set -d MTCODE
endif

cd \

BIOSID32.nsh /HS
BIOSID.nsh /HS

cls

if "%MTSNTool%" == "EEPROMC" then
   goto ReadAll
endif

if "%CandidatesCC%" == "" then
   goto ReadAll
else
   BIOSID.nsh /ms07
endif

:ReadAll
echo " "
echo UUID:
echo %uUUID%
echo " "
echo SN:
echo %uLNtoS%
echo " "
echo MTM:
echo %uMTtoS%
echo " "
echo Product Name:
echo %uPNtoS%
echo " "
echo "Done!"

Uone.nsh /h

