在PC上查找所有物理有线连接 [英] Find All Physical Wired Connections on A PC

查看:117
本文介绍了在PC上查找所有物理有线连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello Codeproject,
出于某种背景,我尝试在我们公司中设置Wake on lan设置.我们大约有50种硬件配置,大部分基于Lenova.我们的主要操作系统是Windows XP.每台PC上都需要更改一些设置.其中一些设置特定于XP,而某些则特定于驱动程序.

Windows XP设置:(已完成)
-允许休眠

驱动程序的设置为:
-允许省电(已完成)
-EnablePME-设置为已启用"
-局域网唤醒-设置为魔术包"

我正处于最初的研究阶段,需要在每台PC上推出所需的配置.我正在寻找一种确定PC上物理有线连接的方法.我的目标是创建有关已知有线连接的报告.使用SCCM,我能够生成所有连接的报告(205个结果),但包含所有连接,包括蓝牙,虚拟连接,无线等.

到目前为止,我已经看过win32_networkadapterwin32_networkadapterconfiguration.

我也查看了注册表以尝试找到线索.我发现所有网络驱动器配置都存储在:

Hello Codeproject,
For a bit of background, I am attempting to setup Wake on lan settings in our corporation. We have approximately 50 hardware configurations, mostly Lenova based. Our primary OS is Windows XP. There are a few setting that need to be changed on each PC. Some of these settings are specific to XP, and a few are driver specific.

Windows XP Settings: (already complete)
- Allow Hibernate

Settings for the driver are:
- Allow to Save Power (already Complete)
- EnablePME - set to "enabled"
- Wake on Lan Type - set to "Magic Packet"

I am in the initial research phase of pushing out the required configuration on each PC. I am looking for a way to determine the physical wired connections on a PC. My goal is to create a report of the known wired connections. Using SCCM I have been able to generate a report of all connections (205 results) but that contains All connections include blue tooth, virtual connection, wireless etc..

So far I have looked at win32_networkadapter, win32_networkadapterconfiguration.

I have also looked at the registry to try and find a lead. I have discovered that all network drive configuration is stored at:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002bE10318}


到目前为止,注册表项还没有产生任何有用的信息.

任何帮助将不胜感激.


Brett Hamilton


So far registry entries has not produced anything useful.

Any assistance would be appreciated.


Brett Hamilton

推荐答案

我发现的最好方法是通过注册表项的组合.
获取网络连接...也可以直接在注册表中的以下位置找到此信息:HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control \ Class \ {4D36E972-E325-11CE-BFC1-08002bE10318}

查找带有特征" = 132
的所有条目
这将为您提供无线和有线物理连接的列表.

接下来转到HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control \ Network \ {4D36E972-E325-11CE-BFC1-08002BE10318}
使用您在物理连接上找到的实例".在物理连接的键下,您将找到"MediaSubType"键.
-有线连接的值为1.
-无线将具有值2.
-我还观察到其他一些值...我无法找到该枚举的定义.
The best way I have found is through a combination of registry Entries.
Get the network connections... This information can also be found straight in the registry at the path: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002bE10318}

Look for any entries with the "Characteristics" = 132

This will give you a list of physical connections both wireless and wired.

Next go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Network\{4D36E972-E325-11CE-BFC1-08002BE10318}
Use the ''instanceid''s that you found on the physical connections. Under the physical connection''s key, you will find the ''MediaSubType'' key.
- Wired connections have value 1.
- Wireless will have the value 2.
- I have also observed a few other values... i have been unable to find the definition of this enum.


检查以下文章: ^ ]

由于WOL数据包需要MAC地址,因此您必须事先将它们保存在应用程序中(注册以唤醒)等,然后使用上面的代码将其发送.
Check the following article : Wake On Lan sample for C#[^]

Because WOL packets need the MAC address you will have to save them beforehand in your application (register to be woken up etc.) then send it using the code above.


这篇关于在PC上查找所有物理有线连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆