EFileTahi-A Posted November 10, 2004 Posted November 10, 2004 Hello m8s, I need to retrieve the networks card manufacter serial key (which is unic). Can some one explain me in theory how to do this? Or point me to any turorial? tks! Quote
Administrators PlausiblyDamp Posted November 10, 2004 Administrators Posted November 10, 2004 (edited) As a quick sample create a new project and add a listbox, at the top of the file do a using system.Management and also add a reference to system.Management.dll then paste the following code into the form private void Form1_Load(object sender, System.EventArgs e) { ManagementClass Netconfig = new ManagementClass("Win32_NetworkAdapterConfiguration"); ManagementObjectCollection Nics = Netconfig.GetInstances(); foreach(ManagementObject Nic in Nics) { if((bool)Nic["IPEnabled"] == true) listBox1.Items.Add(string.Format("MAC address\t{0}", Nic["MacAddress"].ToString())); Nic.Dispose(); } } Edited May 4, 2007 by PlausiblyDamp Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
EFileTahi-A Posted November 12, 2004 Author Posted November 12, 2004 ahhh tks alot!!! - THREAD RESOLVED - Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.