This may help. A new variable (NewVar) is created with a value of SP-ContriD. The WMIC output was perfectly setup, only needed a set instruction to precede it.
@echo off
for /f "tokens=1" %%f in ('wmic bios get serialnumber /value ^| find /i "serialnumber"') do set %%f
for /f "tokens=1-2" %%i in (GetPCName.txt) do (
if %%i==%SerialNumber% set NewVar=%%j
)
if %errorlevel%==0 (
echo There is hope!
)
echo Variable NewVar has a value of %NewVar%
Happy Computing