开发者

Retrieving laptop model on Windows

开发者 https://www.devze.com 2023-03-08 08:54 出处:网络
I wrote a program that reads system information from registry/CPU, like CPU speed, amount of RAM, GPU card name etc.

I wrote a program that reads system information from registry/CPU, like CPU speed, amount of RAM, GPU card name etc.

On Mac OSX I can retrieve information about hardware model (for example MacBookPro8,2 is MacBook Pro Core i7 from early 2011). While I know that it's impossible on desktop Windows PC because they are not standarized, a lot of people are using Windows notebooks. And I don't think that custom-build notebooks are very 开发者_高级运维popular.

So my question is, is it possible to obtain model information like "Samsung Series 9 900X3A-A03"? Or at least vendor information (Samsung)?


Use this in a .vbs file to get make / model #. You can also use the objects by having the .manufacturer and .model method write to variables. defining and assigning "." to this value makes the script run on the machine you are executing it on. If you have admin privileges, you could run this on another ocmputer on the network by specifying the computer's network name in: strComputer = "SomeComputer"

Paste into a VBS:

strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")
Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_ComputerSystem")
For Each objItem In colItems

  WScript.Echo objItem.Manufacturer & " " &  objItem.Model

'WScript.Echo "Model: " & objItem.Model

Next
0

精彩评论

暂无评论...
验证码 换一张
取 消