3

Eventually I'm going to be using this in Java Applet for extra security to the user. I know it's possible because I remember doing it before, I just can't remember the line that gets the correct information.

I'm searching for a line that will return the Processor ID, Serial number. Just these two are fine.

I have used google and tried a few commands like "wmic bios get serialnumber" and it doesn't return anything.

The Processor ID and Serial number should be two unique numbers or Strings.

dtech
  • 47,916
  • 17
  • 112
  • 190
kbz
  • 984
  • 2
  • 12
  • 30

1 Answers1

6

The BIOS serial number often is not set.

This should always give you unique hardware information with a similar command:

wmic csproduct get uuid

You could also combine this info with more information to be sure it is unique. Some examples:

wmic csproduct get uuid,name
wmic bios get name,version
typ1232
  • 5,535
  • 6
  • 35
  • 51
  • How is the uuid set? Is it different per computer or are they able to change it manually etc? I'm trying to get information which differs per computer and is rather hard if not impossible to change. – kbz May 08 '13 at 17:44
  • @Kieran I think it's a hardware property. I don't know if you can directly overwrite it, but i'm sure that you can fake it or modify the wmic program. If the uniqueness of this is dependant on the security of you program then you should rethink, because there is no security. A user that knows what he does can fake everything he wants. – typ1232 May 08 '13 at 17:52
  • hmm okay thanks, I'll have to think of something. One last question, does this work on every operating system or just a certain version of Windows? – kbz May 08 '13 at 17:57
  • @Kieran wmic is a windows application. msdn says its supported since windows XP. see http://msdn.microsoft.com/en-us/library/windows/desktop/aa394531(v=vs.85).aspx – typ1232 May 08 '13 at 17:59
  • WMIC is not supplied (at least by default) with XP/Home. – Magoo May 08 '13 at 20:20
  • `wmic cpu get ProcessorId` –  Aug 21 '16 at 09:55
  • The UUID from `wmic csproduct get uuid` comes from the SMBIOS of the Motherboard. It is not guaranteed to be unique since some manufacturers are lazy and reuse the same number. More details in the comments here: https://stackoverflow.com/a/58416992/8874388 – Mitch McMabers Dec 07 '19 at 21:43