如何获取MAC地址

如何获取MAC地址,第1张

获取MAC地址步骤如下:

1打开开始菜单,在搜索框输入 cmd 按回车键

2 输入ipconfig/all 按回车键

3显示的物理地址,即为MAC地址。

/// public class Form1 : SystemWindowsFormsForm { private SystemWindowsFormsLabel label1; private SystemWindowsFormsLabel label2; private SystemWindowsFormsLabel label3; private SystemWindowsFormsTextBox txtMac; private SystemWindowsFormsTextBox txtIP; private SystemWindowsFormsTextBox txtName; private SystemWindowsFormsButton btnGet; private SystemWindowsFormsButton btnExit; private SystemWindowsFormsTextBox txtCPUInfo; private SystemWindowsFormsLabel label4; /// /// 必需的设计器变量。 /// private void InitializeComponent() { thislabel1 = new SystemWindowsFormsLabel(); thislabel2 = new SystemWindowsFormsLabel(); thislabel3 = new SystemWindowsFormsLabel(); thistxtMac = new SystemWindowsFormsTextBox(); thistxtIP = new SystemWindowsFormsTextBox(); thistxtName = new SystemWindowsFormsTextBox(); thisbtnGet = new SystemWindowsFormsButton(); thisbtnExit = new SystemWindowsFormsButton(); thistxtCPUInfo = new SystemWindowsFormsTextBox(); thislabel4 = new SystemWindowsFormsLabel(); thisSuspendLayout(); // // label1 // thislabel1Location = new SystemDrawingPoint(24, 35); thislabel1Name = "label1"; thislabel1Size = new SystemDrawingSize(80, 16); thislabel1TabIndex = 0; thislabel1Text = "本机MAC地址:"; // // label2 // thislabel2Location = new SystemDrawingPoint(24, 72); thislabel2Name = "label2"; thislabel2Size = new SystemDrawingSize(80, 16); thislabel2TabIndex = 1; thislabel2Text = "本机IP地址:"; // // label3 // thislabel3Location = new SystemDrawingPoint(24, 112); thislabel3Name = "label3"; thislabel3Size = new SystemDrawingSize(80, 16); thislabel3TabIndex = 2; thislabel3Text = "计算机名:"; //

解决方法如下:

第一步:改回MAC地址,如果你已经修改了,那就改回来。

在网络和管理中心-->本地连接-->属性-->配置-->高级中找到网络地址,并设置你本机的网络地址(和客户端界面中一样哦)

 

第二步:找到你的校园网客户端的日志文件,一般为C:\Drcom\DrupdateClient\log

如上所示:我的mac地址出问题的地方是注册表中的SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002bE10318}\0007  在0007项中有个叫做NetworkAdress的值为000000000000 才导致了我的MAC老有问题。所以找到此项删除就好了!!!(注意:打开注册表的方法是在开始处的搜索框中输入regedit,然后enter一下进入,找到以上的地址)

有的机器需要重启后注册表才更新,可以重启后再次连接就好了。当然如果日志中不光提示0007(上例)这一项,那么在日志中所有提示出问题的项中的NetworkAdress的项都需要删除。

根据具体问题类型,进行步骤拆解/原因原理分析/内容拓展等。

具体步骤如下:/导致这种情况的原因主要是

以上就是关于如何获取MAC地址全部的内容,包括:如何获取MAC地址、用C#编程怎么样实现提取原始的物理MAC地址(不是更改过的MAC地址)、“发现您修改了网卡MAC地址,请回恢复删除注册表对应项到原始的网卡MAC地址。”怎么办等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/web/9726957.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2023-05-01
下一篇2023-05-01

发表评论

登录后才能评论

评论列表(0条)

    保存