Search code examples
c#windowswireless

Programmatically creating a Wireless Access Point in C#


I would like to create a Wireless Access Point on my machine programmatically through C#.NET.
I have been trying to find a way to implement this, but cannot get a good solution.

Most solutions I came across only allowed me enough control to connect to an Access Point, not create one.

This code should work on Windows 7 and above. Although, if it can work on Windows XP, it would be a great advantage (but not a requirement).


Solution

  • The simplest way is to use built-in functionality. Call these shell commands from your program:

    netsh wlan set hostednetwork mode=allow ssid=<NetworkName> key=<AccessKey> keyUsage=persistent
    netsh wlan start hostednetwork