In any version of Windows, how can I put my wireless network card in ad-hoc mode through the command prompt?

I want to do this because I want to hide this from the user (ie. I don't want them to have to do by themselves) I'd rather do this using an API or native windows function, but since I found no static approach in any version of Windows, I figured that the CLI is the next best thing.

link|improve this question
feedback

1 Answer

netsh wlan del filter permission=denyall networktype=adhoc

removes any filtering for ad-hoc networks.

You can then use

netsh wlan connect ssid="SSID" name="Profile" interface="Interface"

to connect to a network, where you need to fill in the quotation marks.

The syntax and whether parameters are optional are outlined in this TechNet document.

link|improve this answer
This will connect to an already existing network? Can it also be used to create/initialize a new ad-hoc network? – Unknown Oct 31 '11 at 20:35
@Unknown: I don't know of another way. Although you could try to figure out with Process Monitor what registry values are accessed to create such a profile and then replicate it with the reg command or by producing a .reg file and importing it. – Tom Wijsman Oct 31 '11 at 21:01
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.