enable Win10 inbuild hotspot by cmd/batch/powershell

前端 未结 7 1948
渐次进展
渐次进展 2020-12-31 10:59

as the title says I search for a way to enable/disable the Hotspot inbuild in Win10 via the command prompt/powershell/a batch file. In the GUI it can be easily done with the

7条回答
  •  温柔的废话
    2020-12-31 11:20

    I can confirm @smallscript's winRT solution works. Running the script will either open/close hotspot connection depends on the current status (enabled to disabled and vice versa).

    To complete his answer I will point out two additional things in order to compile the code:

    • You must have Windows SDK installed(I used version 10.0.18362.0) to have the winRT library.
    • You need to link the RuntimeObject.lib library to your project, otherwise you'll get unresolved external symbols (Using VS, Add the name to: Project -> Properties -> Linker -> Input -> Additional Dependencies)

提交回复
热议问题