开发者

Detail about Win32_OperatingSystem SerialNumber

开发者 https://www.devze.com 2023-01-05 05:57 出处:网络
I\'m searching for some 开发者_如何学JAVAinformation regarding Win32_OperatingSystem SerialNumber (MSDN link).

I'm searching for some 开发者_如何学JAVAinformation regarding Win32_OperatingSystem SerialNumber (MSDN link).

Will this number be different when I reinstall Windows with the same key on the same machine?

I intend to use it to identify an installation (Windows + PC combination).


I'm not so sure about the stability of Win32_OperatingSystem.SerialNumber... but I wouldn't recommend using it as your unique identifier.

To get the serial number that's burned into the computer's hardware--i.e. that never changes*--the method that I found after some research is this:

  1. Fetch Win32_BIOS.SerialNumber -- this should work for >90% of PCs/servers, including all the major manufacturers (HP, Dell, etc.).
  2. If that didn't work, then try Win32_BaseBoard.SerialNumber.
  3. Failing that, your last resort is Win32_ComputerSystemProduct.IdentifyingNumber.

**Note: technically, the serial number would change if the motherboard was replaced with a new one--thus the (new) burned-in S/N wouldn't match the labels on the case... but this is a rare/unusual exception.*

0

精彩评论

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