tft每日頭條

 > 生活

 > win10如何長期開啟移動熱點

win10如何長期開啟移動熱點

生活 更新时间:2024-09-13 01:27:05

win10如何長期開啟移動熱點?Win10系統自帶了移動熱點功能,配備無線網卡的電腦,直接點擊移動熱點就可以使用手機等設備共享本地網絡連接wifi上網了但是移動熱點每次開機都需要再次點擊才能打開熱點,下面就是如何配置開機自動啟動移動熱點的方法,接下來我們就來聊聊關于win10如何長期開啟移動熱點?以下内容大家不妨參考一二希望能幫到您!

win10如何長期開啟移動熱點(win11移動熱點每天都要手動開啟)1

win10如何長期開啟移動熱點

Win10系統自帶了移動熱點功能,配備無線網卡的電腦,直接點擊移動熱點就可以使用手機等設備共享本地網絡連接wifi上網了。但是移動熱點每次開機都需要再次點擊才能打開熱點,下面就是如何配置開機自動啟動移動熱點的方法。

1、鼠标右擊Win10屏幕左下角的開始菜單,或者按Win X彈出隐藏菜單,打開Windows PowerShell(管理員)(A),在Windows11中可以打開 Windows終端(管理員)

2、在打開的Windows PowerShell窗口中輸入:set-executionpolicy remotesigned

然後按下回車鍵确定

3、确定後将出現如下的提示。輸入‘a’然後按下回車鍵。關閉Windows PowerShell窗口。

4、在資源管理器地址欄輸入:%appdata%\Microsoft\Windows\Start Menu\Programs\Startup 然後按下回車鍵進入“啟動”文件夾,空白處新建一個文本文檔,在文本中輸入以下内容:

powershell -executionpolicy remotesigned -file "%appdata%\Microsoft\Windows\Start Menu\Programs\開啟熱點.ps1"

exit

5、關閉并保存文本文檔,把文檔名稱改為“開機啟動熱點”,後綴名.txt改為.bat。

6、在資源管理器的地址欄輸入:%appdata%\Microsoft\Windows\Start Menu\Programs

然後按下回車鍵進入“程序”文件夾,在空白處新建一個文本文檔,在文檔中輸入以下内容:

Add-Type -AssemblyName System.Runtime.WindowsRuntime

$asTaskGeneric = ([System.WindowsRuntimeSystemExtensions].GetMethods() | ? { $_.Name -eq 'AsTask' -and $_.GetParameters().Count -eq 1 -and $_.GetParameters()[0].ParameterType.Name -eq 'IAsyncOperation`1' })[0]

Function Await($WinRtTask, $ResultType) {

$asTask = $asTaskGeneric.MakeGenericMethod($ResultType)

$netTask = $asTask.Invoke($null, @($WinRtTask))

$netTask.Wait(-1) | Out-Null

$netTask.Result

}

Function AwaitAction($WinRtAction) {

$asTask = ([System.WindowsRuntimeSystemExtensions].GetMethods() | ? { $_.Name -eq 'AsTask' -and $_.GetParameters().Count -eq 1 -and !$_.IsGenericMethod })[0]

$netTask = $asTask.Invoke($null, @($WinRtAction))

$netTask.Wait(-1) | Out-Null

}

$connectionProfile = [Windows.Networking.Connectivity.NetworkInformation,Windows.Networking.Connectivity,ContentType=WindowsRuntime]::GetInternetConnectionProfile()

$tetheringManager = [Windows.Networking.NetworkOperators.NetworkOperatorTetheringManager,Windows.Networking.NetworkOperators,ContentType=WindowsRuntime]::CreateFromConnectionProfile($connectionProfile)

if ($tetheringManager.TetheringOperationalState -eq 1)

{

"Hotspot is already On!"

}

else{

"Hotspot is off! Turning it on"

Await ($tetheringManager.StartTetheringAsync()) ([Windows.Networking.NetworkOperators.NetworkOperatorTetheringOperationResult])

}

7、關閉并保存文本文檔,修改文檔名稱為“開啟熱點”,後綴名.txt改為.ps1

8、重啟電腦就能開機自動啟動移動熱點了,如果安裝了殺毒軟件,記得把“開機啟動熱點.bat”添加為信任項即可。

更多精彩资讯请关注tft每日頭條,我们将持续为您更新最新资讯!

查看全部

相关生活资讯推荐

热门生活资讯推荐

网友关注

Copyright 2023-2024 - www.tftnews.com All Rights Reserved