문제

I am using Windows 8 and ended up realizing that he no longer has support for creating Ad Hoc networks. The only possible way to create such a network is by console command:

netsh wlan set hostednetwork mode=alow ssid=ssid key=key
netsh wlan start hostednetwork

I started doing a program in C# using a function that executed the command console using this example: Execute Shell Command using C#

Unfortunately some commands only work in administrator mode, and I could not get the console commands work as an administrator directly by code.

Here's my question: Is there any library or API in C # to create an Ad Hoc network?

도움이 되었습니까?

해결책

Are you running your program as Administrator? If you're running it in the debugger then running the debugger as Administrator will cause your program to as well.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top