#1 20 Feb 2017 11:48

antonov314
New Member
Registered: 20 Feb 2017
Posts: 1

Check model copy files

Hi guys,

i'am new here, i have  question.
i trying to make a script that check the pc model and copy the correct filemap.

model = M700 -> copy -> M700 map to c.

i am no programmer got a liddel idea how to work with it. smile

@echo off
wmic computersystem get model do (
  set model=%%i
  goto :done
  )
:done
if [%model%]==[Test] start "" "%ProgramFiles%\Internet Explorer\iexplore.exe" "https://www.google.nl/?gws_rd=ssl"
endlocal
pause

its getting me a error "Invalid GET Expression"

Hope you guys can help me smile

Offline

#2 20 Feb 2017 20:54

npocmaka
Member
From: Bulgaria
Registered: 03 Dec 2009
Posts: 430

Re: Check model copy files

not tested:


for /f "tokens=* delims=" %%a in ('wmic computersystem get model /format:value') do (
	for /f "tokens=* delims=" %%# in ("%%a") do set "%%#"
)

echo %model%

Offline

Board footer

Powered by FluxBB