GoogleLove 发表于 2025-4-22 10:15

win11开机自启移动热点

本帖最后由 GoogleLove 于 2025-4-22 10:20 编辑

编写个 wifi.bat 脚本,放到 shell:startup 文件夹(C:\Users\XXX\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup)下就可以了,内容如下:

@echo off
powershell.exe -ExecutionPolicy Bypass -NoProfile -WindowStyle Hidden -Command "$ConnectionProfile=::GetInternetConnectionProfile();$TetheringManager=::CreateFromConnectionProfile($ConnectionProfile);if($TetheringManager.TetheringOperationalState -ne 1){$TetheringManager.StartTetheringAsync()}"

ifyouareok 发表于 2025-4-22 11:18

感谢分享

lrjycyz 发表于 2025-4-22 19:39

PS的代码也太长了嘛,以前CMD只需要
netsh wlan set hostednetwork mode=allow ssid=名字 key=密码
netsh wlan start hostednetwork
然后去网卡里面勾选共享

csx18 发表于 2025-4-22 20:00

多谢分享{:5_262:}

lstplq 发表于 2025-4-22 22:45

改天试试效果

asku 发表于 2025-4-23 09:17

貌似还有个问题就是若无人链接,不久就会自动关闭热点 ,因此如何保持不断?

Federer 发表于 2025-4-23 09:34

收藏系列我想要的其实是新系统oobe到系统阶段自动连接预制的xml文件的无线网

GoogleLove 发表于 2025-4-23 11:35

asku 发表于 2025-4-23 09:17
貌似还有个问题就是若无人链接,不久就会自动关闭热点 ,因此如何保持不断? ...

把节能关掉就行了


z.uo 发表于 2025-4-25 16:15

有没有办法强制开启5G热点的办法呀
页: [1]
查看完整版本: win11开机自启移动热点