To protect software by accessing harddisk serial no [closed]
I want to get the VB.NET or VB code to access the hard disk serial no when starting the program. It's to help me to protect my own software from people who try to pirate copies. In c#, but you get the idea. You'll want to use System.Management for this: string driveLetter = Environment.SystemDirectory.Substring(0, 2); string sn = new System.Management.ManagementObject("Win32_LogicalDisk.DeviceID=\"" + driveLetter + "\"").GetPropertyValue("VolumeSerialNumber").ToString(); As others have pointed out, this might not be the best way to handle this. However, that's your business. I can't offer you