I\'m trying to get a Computer System Model type via Batch file. for this i\'ve created this script:
systeminfo | find \"System Model\" > %temp%\\TEMPSYSINFO.t
You're doing it the hard way. Use wmic
. It's a lot faster and less complicated to scrape.
for /f "tokens=2 delims==" %%I in ('wmic computersystem get model /format:list') do set "SYSMODEL=%%I"
set "Line1=*** System Model: %SYSMODEL%"
echo %Line1%
wmic
lets you query all sorts of neat wmi garbage. wmic /?
for more info.
(updated per OP's comment under Fuzzy Button's answer)