Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I get processor and hard disk manufacturing serial numbers and ids?

How can I get the following hardware attributes using Matlab?

  • Motherboard manufacturing serial number
  • Processor Id
  • Processor manufacturing serial number
  • Hard disk Id
  • Hard disk manufacturing serial number

And is there any function or class responsible for detecting attributes of other machine hardware components attributes?

I know it can be done using system or console commands, but I don't know how. However, I prefer to know both two ways, the one using Windows console commands, and the one without using it.

like image 586
Sameh K. Mohamed Avatar asked Jan 01 '13 09:01

Sameh K. Mohamed


People also ask

How do I find my processor serial number?

Full serial number (also known as ATPO) or partial serial number (also known as partial ATPO) located on the outside edge of the processor, and it contains the last three to five digits from the full serial number for the processor.

How can I find my processor serial number using CMD?

Type cmd in the Windows search bar at the bottom-left of the screen, then select Command Prompt from the list of results. In the Command Prompt window, type wmic bios get serialnumber and press Enter. The Service Tag (Serial Number) appears as shown in the image below.

Do hard drives have serial numbers?

Next to each hard drive, you'll see the drive's serial number. This is the number that the manufacturer has assigned to the drive. That's a quick and easy way to read your hard drive's serial number!


2 Answers

This is a way to get hard disk serial number using console command from matlab:

%// Get hard disk serial using windows console command
cmd         = 'wmic diskdrive get SerialNumber';
[~, result] = system(cmd);
%// Extract first hard disk serial number
fields      = textscan( result, '%s', 'Delimiter', '\n' );
fields      = strtrim(fields{1});
serialNo    = fields{2};

The same for the processor id:

%// Get processor id using windows console command
cmd           = 'wmic cpu get ProcessorId';
[~, result]   = system(cmd);    
%// Extract first processor id
fields        = textscan( result, '%s', 'Delimiter', '\n' ); 
fields        = strtrim(fields{1});
processorId   = fields{2};

It's all about using console command wmic + [hardware name] + get + [attributename] and if you want to know the whole attributes available for some device you can use get in your command without naming any attribute, Example:

command = 'wmic csproduct get'

that will get all available attributes of your machine as a product and its values.

like image 74
Sameh K. Mohamed Avatar answered Sep 22 '22 20:09

Sameh K. Mohamed


I can add some more commands here:

cmd='wmic baseboard get serialnumber';
[~, result]   = system(cmd);    
%// Extract first processor id
fields        = textscan( result, '%s', 'Delimiter', '\n' ); 
fields        = strtrim(fields{1});
baseboardSN   = fields{2};

You can also try the following:

wmic csproduct get name wmic bios get serialnumber wmic csproduct get UUID

like image 24
Farzad Amirjavid Avatar answered Sep 21 '22 20:09

Farzad Amirjavid