win10自动开启移动热点脚本

1、同时按win + R,弹出运行窗口,在运行窗口里输入:shell:startup,点确定。
2、打开一个文件夹之后,新建一个记事本文件,写入下面的代码,并保存。

powershell -ExecutionPolicy Bypass "$connectionProfile = [Windows.Networking.Connectivity.NetworkInformation,Windows.Networking.Connectivity,ContentType=WindowsRuntime]::GetInternetConnectionProfile(); $tetheringManager = [Windows.Networking.NetworkOperators.NetworkOperatorTetheringManager,Windows.Networking.NetworkOperators,ContentType=WindowsRuntime]::CreateFromConnectionProfile($connectionProfile); $tetheringManager.StartTetheringAsync();"

3、将记事本文件名更改成:wifi.bat,注意后面是bat的格式,而不是txt。
4、完成。