Click here to Skip to main content
15,888,802 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

is there any possible way to get the PC serial number using .net?
Thanks in advance
Posted
Updated 3-Apr-16 22:04pm

 
Share this answer
 
Comments
ranukamadushan 25-Oct-13 8:03am    
Thank You. Solved it
Thanks7872 25-Oct-13 8:04am    
You are welcome. :-)
You can use WMI and the classes in the System.Management namespace to get the Win32_SystemEnclosure[^] class to get the serial number, IF AND ONLY IF the machine exposes it to WMI. You can find an example of querying WMI here[^].

There is no other "standard" interface to do so and no requirement anywhere that the serial number be exposed at all.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900