1
0
I've just started working with WindowsScripting and would like some help figuring out how to write a Script that would check the model of a Computer and store the result in Variable in the Bat file.
Ultimately I am trying to automate checking the Computer model and download the correct BIOS file.
Here's what I've got so far.
start "" wmic computersystem get model > model.txt
if model == X
start "" %windir%\explorer.exe "download url"
elseif model == Y
start "" %windir%\explorer.exe "download url"
elseif model == Z
start "" %windir%\explorer.exe "download url"
Any help is appreciated as I am new to this whole thing.
To the close voters: 1/ question is not off-topic, batch files are on-topic for [su] 2/ it's perfectly clear what he is asking (see my answer) – DavidPostill – 2016-01-13T18:38:51.203
1Shouldn't be closed, but doesn't sound like the best idea... I wouldn't want to update my BIOS without carefully reading the release notes, and making absolutely 100% sure I get the correct update file. Most BIOS update info I've read (from the manufacturers) say "If you don't need it, and if it ain't broke, don't fix it" – Xen2050 – 2016-01-16T19:36:50.747
Two people have voted to close this, but I can't see why. The question is clear: OP wants to get the computer model and branch on it. – Ben N – 2016-01-21T16:20:18.457