I searched a lot related to netsh and ipconfig /renew and ipconfig /release.

My idea is to write a batch file that would automatically connect to a particular wireless local area network using a network interface .

I tried using ipconfig /renew release ... but it cannot be used as my intention is to keep the media in a disconnected state before running the batch file ..

any suggestions ?

Edit:

Narrowed it down to

connect name=Profile2 ssid=SSID2 interface="Wireless Network Connection"

Where do i find the "name" in network and sharing center?

link|improve this question

50% accept rate
feedback

migrated from stackoverflow.com Jun 2 '11 at 8:11

This question came from our site for professional and enthusiast programmers.

2 Answers

up vote 1 down vote accepted

What about:

netsh wlan connect=SSID

http://www.computing.net/answers/networking/wireless-connect-command-line/34771.html

link|improve this answer
Hi Peehaa thanks for quick reply :) ... I tried that too .. the same poster says that the method has been lost and has been downgraded ... – HelloWorld_Always Jun 2 '11 at 0:20
@HelloWorld_Always: The poster says the reason the method got lost is because he downgraded his OS from Vista -> XP. So I don't know what clients you want to support with the batch file, but I you use >= Vista you should be ok. What error did you get when trying the method or are you on XP? – RepWhoringPeeHaa Jun 2 '11 at 0:28
it workd .. sorry for accepting after a long time – HelloWorld_Always Jun 24 '11 at 17:17
@HelloWorld_Always: No problem. Glad I could resolve your issue. And thanks for accepting the answer so other users know it works :) – RepWhoringPeeHaa Jun 24 '11 at 20:51
feedback

You could try to google a bit:

Connect to a wireless network via command line

link|improve this answer
that was one of the pages i visited in a 2 hour long google search . But it is for the Macintosh,linux ... not for command prompt in window s... – HelloWorld_Always Jun 2 '11 at 0:13
@Centro: it's not for Windows. By the looks of it OP wants Windows command. – RepWhoringPeeHaa Jun 2 '11 at 0:14
@HelloWorld_Always I'm sorry I missed it. Just relied on Google and its first result that contains "windows" keyword :). – Centro Jun 2 '11 at 0:29
feedback

Your Answer

 
or
required, but never shown

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