Get Windows Serial Number with VB.NET
I'll show you fast and easy way to get operating system serial number that the application is running on. Here how to accomplish this task:
In Page_Load event handler (for example) getting WSN:
Dim MOS As ManagementObjectSearcher = New ManagementObjectSearcher("Select * From Win32_OperatingSystem")
Dim MO As System.Management.ManagementObject
Dim MOC As System.Management.ManagementObjectCollection = MOS.Get
Dim WindowsSerial As String = String.Empty
For Each MO In MOC
WindowsSerial = MO("SerialNumber")
Next