Reputation: 11
I´m very fresh at scripting, and even though I´ve spent quite a handful amount of time researching, I´ve come up empty handed.
Quite simply, I need to automate this command so that more people can use it, but have no idea how to make it prompt for data input:
*
wmic /node:(COMPUTERNAME) bios get serialnumber
*
The objective here is for the batch file to ask for a computer name, and hence providing the requested data.
Any help will be appreciated
Upvotes: 1
Views: 1645
Reputation: 56180
for asking the user something, use set /p
(see set /?
for help):
set /p "cn=Enter Computername: "
wmic /node:%cn% bios get serialnumber
Upvotes: 1