Search code examples
c#windowswindows-10-desktophotspot

How to control Windows 10 Mobile Hotpot settings from C# Windows application


I'm developing a Windows application in C# and distribute it with a PC with Windows Home operating system to customers. I'd like to make the PC a wireless hotspot.

I tried creating a hosted network, but NETSH WLAN show drivers reports that the driver does not support hosted network. I can create a hotspot using Windows settings Mobile hotspot manually. Searching online I can only find code that runs on WinRT.

Is there a way to do what Windows Settings Mobile Hotspot control does in C#? enter image description here


Solution

  • Is there a way to do what Windows Settings Mobile Hotspot control does in C#?

    Currently, there is fewer documents on this. I checked official code sample, it looks easy to understand. We use xml file to store hotspot configuration. And it contains SSID encryption protocol HotspotProfile etc. And then, we call ProvisionFromXmlDocumentAsync to load xml info and create hotspot. For more info please refer to this case reply.