Link to home
Start Free TrialLog in
Avatar of CMHowes
CMHowesFlag for United States of America

asked on

CMD Command to add preferred wireless networks

Okay, so I'm trying to make my life a little easier for the future as I continue to receive and setup new laptops for my company.  I'm a big fan of batch files which do 98% of the work for me.  Thus I already have a batch that copies all the necessary install files onto the computer, installs them silently, uninstalls all the BS Dell software that comes standard silently, etc.  My next item I'd like to add to that new pc batch is some way to add preferred wireless networks, including the WEP key so that I don't have to manually go in and add them.  I like to do this so that when the laptop is handed out, I don't get a phone call saying 'how do i connect to the wireless?'.  Instead I like it when i've pre-added these wireless networks and the wireless connects automatically when in range.  So to sum it all up...I'm looking for the command that I would need to use to add preferred wireless networks.  Thanks in advance.
Avatar of jkr
jkr
Flag of Germany image

Seems to be possible if you have e profile file describing the WLAN interface, see http://technet2.microsoft.com/windowsserver2008/en/library/f435edbe-1d50-4774-bae2-0dda33eaeb2f1033.mspx?mfr=true ("Netsh Commands for Wireless Local Area Network (WLAN)"). Even though that's W2k8, that could work with XP also:
netsh add profile filename=C:\Users\WirelessUser\Documents\profile1.xml interface="Wireless Network Connection"

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Shift-3
Shift-3
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of CMHowes

ASKER

Is there a way to export a wireless profile from XP into an XML file like that so that I would be able to try to import it into another machine using the netsh command?