2

Using Java, is it possible to get the so called windows "disk signature" of a drive? I know I could somehow parse the output of diskpart, but that wouldn't be such a great solution ):

stefan.at.kotlin
  • 15,347
  • 38
  • 147
  • 270

1 Answers1

1

I haven't tried it with Java but I've worked with the Windows Management Instrumentation before via Python and found to be a really pleasant way of working with Windows. The disk signature is available in the Win32_DiskDrive's Signature property.

The answer to Recommended libraries/howtos for using WMI with java? mentions a few Java to COM bridges that would allow you to tap into the api and mentions this site that looks like it gives a decent example of how to go about accessing WMI from Java.

Community
  • 1
  • 1
geaw35
  • 2,297
  • 3
  • 18
  • 21