系统之家 - 系统光盘下载网站!

当前位置:系统之家 > 系统教程 > 电脑怎么设置开机自动开启移动热点?

电脑怎么设置开机自动开启移动热点?

时间:2022-05-06 10:06:02 作者:辰奕 来源:系统之家 1. 扫描二维码随时看资讯 2. 请使用手机浏览器访问: https://m.xitongzhijia.net/xtjc/20220506/244703.html 手机查看 评论

  许多用户在使用电脑的时候经常会需要使用到移动热点,但是每次开启电脑在去单独开启就非常的麻烦,其实我们可以设置电脑开机自启动移动热点,下面小编就带着大家一起来看看怎么解决吧!

  操作方法:

  1、鼠标右击屏幕左下角的开始菜单,打开 Windows PowerShell(管理员)(A)

  在Windows11中可以打开 Windows终端(管理员)(A)

电脑怎么设置开机自动开启移动热点?

  2、在打开的Windows PowerShell窗口中输入:

  set-executionpolicy remotesigned

  按下键盘上的回车键(Enter按键)。

电脑怎么设置开机自动开启移动热点?

  3、等待一会,将出现如下的提示。输入:a。然后按下回车键(Enter按键)。

电脑怎么设置开机自动开启移动热点?

  4、关闭Windows PowerShell窗口。

  打开资源管理器,并在地址栏输入:

  %appdata%\Microsoft\Windows\Start Menu\Programs\Startup

  然后按下回车键(Enter按键)。

电脑怎么设置开机自动开启移动热点?

  5、将进入“启动”这个文件夹内。在空白处鼠标右击,选择“新建”,选择“文本文档”。

电脑怎么设置开机自动开启移动热点?

  6、更改新建的这个文件的txt后缀为bat。

电脑怎么设置开机自动开启移动热点?

  7、若是出现下图提示,点击“是”。

电脑怎么设置开机自动开启移动热点?

  8、鼠标右键点击该文件,然后选择“编辑”。

电脑怎么设置开机自动开启移动热点?

  9、在打开的窗口输入以下内容:

  1. 01powershell -executionpolicy remotesigned -file "%appdata%\Microsoft\Windows\Start Menu\Programs\pondsihotspot.ps1"
  2. 02exit
复制代码
powershell -executionpolicy remotesigned -file "%appdata%\Microsoft\Windows\Start Menu\Programs\pondsihotspot.ps1" exit
电脑怎么设置开机自动开启移动热点?

  10、在资源管理器的地址栏输入:

  %appdata%\Microsoft\Windows\Start Menu\Programs

  然后按下回车键(Enter按键),将进入“程序”这个文件夹内。

  在空白处鼠标右击,选择“新建”,选择“文本文档”。

  更改新建的这个文件名字为“pondsihotspot.ps1”。

  若是出现重命名提示,点击“是”。

电脑怎么设置开机自动开启移动热点?

  11、鼠标右键点击该文件,选择“打开方式”,选择“记事本”打开。

电脑怎么设置开机自动开启移动热点?

  12、复制以下内容到文件内,完成后保存并关闭。

  1. 01Add-Type -AssemblyName System.Runtime.WindowsRuntime
  2. 02$asTaskGeneric = ([System.WindowsRuntimeSystemExtensions].GetMethods() | ? { $_.Name -eq 'AsTask' -and $_.GetParameters().Count -eq 1 -and $_.GetParameters()[0].ParameterType.Name -eq 'IAsyncOperation`1' })[0]
  3. 03Function Await($WinRtTask, $ResultType) {
  4. 04$asTask = $asTaskGeneric.MakeGenericMethod($ResultType)
  5. 05$netTask = $asTask.Invoke($null, @($WinRtTask))
  6. 06$netTask.Wait(-1) | Out-Null
  7. 07$netTask.Result
  8. 08}
  9. 09Function AwaitAction($WinRtAction) {
  10. 10$asTask = ([System.WindowsRuntimeSystemExtensions].GetMethods() | ? { $_.Name -eq 'AsTask' -and $_.GetParameters().Count -eq 1 -and !$_.IsGenericMethod })[0]
  11. 11$netTask = $asTask.Invoke($null, @($WinRtAction))
  12. 12$netTask.Wait(-1) | Out-Null
  13. 13}
  14. 14$connectionProfile = [Windows.Networking.Connectivity.NetworkInformation,Windows.Networking.Connectivity,ContentType=WindowsRuntime]::GetInternetConnectionProfile()
  15. 15$tetheringManager = [Windows.Networking.NetworkOperators.NetworkOperatorTetheringManager,Windows.Networking.NetworkOperators,ContentType=WindowsRuntime]::CreateFromConnectionProfile($connectionProfile)
  16. 16if ($tetheringManager.TetheringOperationalState -eq 1) {
  17. 17""
  18. 18}
  19. 19else{
  20. 20Await ($tetheringManager.StartTetheringAsync()) ([Windows.Networking.NetworkOperators.NetworkOperatorTetheringOperationResult])
  21. 21}
复制代码
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) { "" } else{ Await ($tetheringManager.StartTetheringAsync()) ([Windows.Networking.NetworkOperators.NetworkOperatorTetheringOperationResult]) }

电脑怎么设置开机自动开启移动热点?

  10、重启电脑,看下是否可以自动打开移动热点。

发表评论

0

没有更多评论了

评论就这些咯,让大家也知道你的独特见解

立即评论

以上留言仅代表用户个人观点,不代表系统之家立场

其他版本软件

人气教程排行

相关系统推荐

官方交流群 软件收录