tags:

views:

357

answers:

2

I want to read a hard disk's factory serial number, not the volume serial number from a Aava program or C or C++ if this isn't possible in Java.

+4  A: 

You can use Win32_PhysicalMedia class with the SerialNumber property to obtain that.

A quick Google search came up with this already written program to do exactly that.

It works just like a SQL Query on a table.

Thanks

mlevit
This is C# solution to be clear
wheleph
+1  A: 

Basically you need to access WMI (windows management interface) from Java.

From quick googling try this solution. Or maybe this open source one.

Check out this for Groovy based solution.

Gregory Mostizky