I have the ultimate answer for this without any external libraries. Simply type this:
wmic bios get serialnumber
This will give you the Serial Number on the PCs chassis ;)
(found in microsoft's knowledge base)
Regards!
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…