Detail about Win32_OperatingSystem SerialNumber
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:
- Fetch Win32_BIOS.SerialNumber -- this should work for >90% of PCs/servers, including all the major manufacturers (HP, Dell, etc.).
- If that didn't work, then try Win32_BaseBoard.SerialNumber.
- 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.*
精彩评论