admin管理员组文章数量:1571937
你有100台win电脑,需要连接上WiFi,你又不想一台一台输入密码,那么怎么写脚本自动连接呢
首先必须已知 WiFi 名,WiFi SSID,及密码
具体怎么查搜索一下方法就可以
编写 xml 配置及 bat 脚本执行
<?xml version="1.0"?>
<WLANProfile xmlns="http://www.microsoft/networking/WLAN/profile/v1">
<name>你的 WiFi 名字</name>
<SSIDConfig>
<SSID>
<hex>你的 WiFi SSID</hex>
<name>你的 WiFi 名字</name>
</SSID>
</SSIDConfig>
<connectionType>ESS</connectionType>
<connectionMode>auto</connectionMode>
<MSM>
<security>
<authEncryption>
<authentication>WPA2PSK</authentication>
<encryption>AES</encryption>
<useOneX>false</useOneX>
</authEncryption>
<sharedKey>
<keyType>passPhrase</keyType>
<protected>false</protected>
<keyMaterial>你的 WiFi 密码</keyMaterial>
</sharedKey>
</security>
</MSM>
<MacRandomization xmlns="http://www.microsoft/networking/WLAN/profile/v3">
<enableRandomization>false</enableRandomization>
</MacRandomization>
</WLANProfile>
将上面的 xml 文本保存到文件 wifi-profile.xml
@rem 导入配置
netsh wlan add profile filename="./wifi-profile.xml" user=all
@rem 连接 WiFi
netsh wlan connect name=你的 WiFi 名字
pause
将上面的 bat 保存到文件 wifi-connect.bat
,跟 wifi-profile.xml
文件同目录。
再将两个文件内中文 WiFi 相关配置
改成自己的。
双击 wifi-connect.bat
即可自动输入密码连接WiFi。
文件名可以随意起,只要脚本能导入即可。
执行结果如下:
参考:
https://qr.ae/pyKTh2
https://blog.csdn/panjunnn/article/details/112356954
版权声明:本文标题:Windows 如何通过脚本命令行netsh自动输入密码连接WiFi 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://www.elefans.com/dianzi/1727710241a1126621.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论