介绍一个windows设备操作工具——devcon.exe

        Windows操作系统对设备的管理,可以通过设备管理器查看。在cmd窗口键入”devmgmt.msc“,即可打开设备管理器。本文要介绍的是微软提供的一个操作设备的工具软件——devcon.exe(Windows Device Console

        devcon.exe的全称是”Windows Device Console“,它是一个命令行工具,用于显示主机上挂载的设备的详细信息。我们也可以用来它来使能设备、删除和添加设备以及安装驱动等。(一个小技巧,可以用它来重起loacal PC)。

        下面将介绍它的使用方法:

1,软件路径,如下:

%WindowsSdkDir%\tools\x64\devcon.exe

从上面可以看出,它要求安装windows wdk,也可通过在”开始->所有应用->Windows kits->Windows Software Development Kits“,点击打开后,在该文件夹中找到”Tools->X64“,该目录下就有devcon.exe。

2,运行

1)使用”管理员权限“运行cmd;

2)转到devcon.exe所在目录,然后就可以开始操作了。



3)typed in "devcon help"即可查看它支持的各种命令

4)typed in "devcon help + command"即可查看该条命令

5)重启PC,只需要typed in "devcon reboot”即可

DevCon.exe 安装驱动的工具,微软官方源码。 修正编译通过,VS2013可调试 Device Console Help: devcon.exe [-r] [-m:\\<machine>] <command> [<arg>...] -r Reboots the system only when a restart or reboot is required. <machine> Specifies a remote computer. <command> Specifies a Devcon command (see command list below). <arg>... One or more arguments that modify a command. For help with a specific command, type: devcon.exe help <command> classfilter Add, delete, and reorder class filters. classes List all device setup classes. disable Disable devices. driverfiles List installed driver files for devices. drivernodes List driver nodes of devices. enable Enable devices. find Find devices. findall Find devices, including those that are not currently attached. help Display Devcon help. hwids List hardware IDs of devices. install Install a device manually. listclass List all devices in a setup class. reboot Reboot the local computer. remove Remove devices. rescan Scan for new hardware. resources List hardware resources for devices. restart Restart devices. sethwid Modify Hardware ID's of listed root-enumerated devices. stack List expected driver stack for devices. status List running status of devices. update Update a device manually. updateni Manually update a device (non interactive). dp_add Adds (installs) a third-party (OEM) driver package. dp_delete Deletes a third-party (OEM) driver package. dp_enum Lists the third-party (OEM) driver packages installed on this machine.
### SQLyog 连接 MySQL 服务器时出现错误 2003 的解决方案 #### 检查 MySQL 服务状态 确保本地的 MySQL 服务已经启动。如果 MySQL 服务未启动,则无法建立连接。可以通过以下方法确认并启动 MySQL 服务: 1. 打开 Windows 的“服务”管理器,查找名为 `MySQL` 或者类似的条目。 2. 如果该服务处于停止状态,右键点击它并选择“启动”。此时,服务的状态应变为“正在运行”。 对于某些情况,在命令提示符下以管理员权限执行启动操作可能更为有效[^3]。 ```bash net start mysql ``` #### 验证 MySQL 安装状况 若在服务列表里找不到 MySQL 相关项,这表明当前机器上并未安装 MySQL 数据库引擎。因为 SQLyog 是作为客户端工具来访问 MySQL 数据库的,所以在缺少服务器端组件的情况下自然会遇到连接问题[^4]。 #### 修改防火墙设置 有时操作系统自带的安全防护机制可能会阻止外部程序与 MySQL 建立网络通信。因此建议临时关闭防火墙测试是否能解决问题;或者更安全的做法是在防火墙中添加例外规则允许 MySQL 流量通过。 #### 调整配置文件参数 检查 MySQL 和 SQLyog 的配置文件(通常是 my.ini 或 my.cnf),特别是关于监听地址的部分。默认情况下,MySQL 应该只接受来自本机 (`localhost`) 的请求。如果有更改过这些设定,请恢复到原始值或将 IP 地址设为 `127.0.0.1` 来限定仅限于内部循环接口上的通讯[^5]。 #### 更新驱动版本 保持所使用的 JDBC/ODBC 等数据源驱动是最新的也很重要。旧版可能存在兼容性缺陷从而引发此类异常现象。前往官方网站下载最新稳定发布的驱动包,并按照说明完成替换过程即可。 以上措施能够帮助排除大部分由环境因素引起的连接障碍。当然还有其他潜在原因可能导致同样的症状发生,比如不正确的用户名密码组合、主机名解析失败等等,针对具体场景进一步排查也是必要的。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值