Skip to main content

Cloud

Vista WiFi Auto-Connect Workaround

Since upgrading from Windows XP to Vista Business at the start of this year I have learned to live with a few behavioral annoyances by either adapting the way I previously performed a specific task or digging up a workaround/fix. Alas, there are still two specific issues that continue to drive me up a wall, day after day. The first of which was documented by Mark Russinovich in his blog entry entitled The Case of the Delayed Windows Vista File Open Dialogs and has me eagerly awaiting the release of Service Pack 1. Since I’m constantly logged into my laptop with cached domain account credentials while rarely actually connected to our home office I see this constantly.

The second issue is related to connecting to wireless networks. First off I have yet to understand the overly-complex and poorly-executed Network and Sharing Center that Vista uses. Tasks that were straight-forward and simple in XP have become cumbersome, and in some cases not even possible in Vista. One such example in particular is the way that wireless networks are managed and configured. Viewing multiple connection profiles is very clunky and requires switching between windows to effectively re-order networks as the View options are disabled and the is no column for profile affinity in that view.

But the biggest oversight is the fact that when a profile is set to automatically connect to a wireless network, the option to manually connect it is not available.

So let’s take a closer look at this behavior:

The properties window for a wireless network connection named "Guest" shows that the setting for Connect automatically when this network is in range is not enabled.

screenshot1

This profile will appear in the Connect to a network window and the right-click menu presents the option to Connect or Disconnect, depending on current connection state.

screenshot2

But this configuration requires that the user manually connects to this network each time the computer is started, brought out of hibernation/sleep, or enters the range of the wireless network. Since computers are supposed to make life easier, let’s configure this profile to automatically connect to the network.

screenshot3

Unfortunately this configuration now completely removes the connection profile from the Connect to a network window, meaning we are relying on Vista to automatically connect. If for some reason the network is in range but Vista is not connecting, the only way I’ve found to succesfully connect through the GUI is to go back to that wireless network’s connection properties, unselect the ‘automatically connect’ option, go back to the connect window, right-click and choose connect. Then go back to the properties again and revert that setting so that auto connect is still re-enabled for future attempts.

Well, I gave up doing all that long ago and simply set all of my wireless networks to not automatically connect as on any given day I’m moving between 3-4 different WiFi networks. My previous laptop with Windows XP did a much better job of automatically connecting to wireless networks, but my new laptop paired with Vista fails to connect the majority of the time. Even replacement of the internal WiFi card did not help. It seems that I had the most success when booting up the system while in range of a network, but almost daily I put the computer into sleep mode while connected to one network and then wake it up in the range of another network as I move from home office to work office to client sites to public networks and it rarely works. So each time I logon I have to manually connect to a network, which I think is a bit ridiculous. And forget about trying to create a shortcut to the network connection on your desktop for quick clicking, Vista doesn’t allow that either.

Luckily there is a simple workaround that has let me configure each wireless network to automatically connect yet doesn’t require that whole song-and-dance routine each time that fails to work and I’m forced to manually connect (which is quite often). The native netsh command can be used to connect/disconnect to a wireless network using the wlan option.

C:>netsh wlan connect /?

Usage: connect [name=]<string> [[ssid=]<string>] [[interface=]<string>]

Parameters:

Tag Value

ssid – SSID of the wireless network.

name – Name of the profile to be used in connection attempt.

interface – Name of the interface from which connection is attempted.

Remarks:

Connect to the wireless network given by ssid using the specified

profile. Connection is attempted from the specified interface unless

there is only one available interface on the system, in which case,

the interface parameter can be omitted.

Parameter profile name is required but ssid is optional. If only one

SSID exists in the profile, then this SSID is used to connect. If there

are multiple SSIDs in the profile, then parameter ssid is required.

Parameter interface is required if there are two or more available

interfaces on the system. When interface is specified, it cannot be

a wildcard name.

If the specified interface is already connected to a wireless network,

this command will first disconnect from the currently connected network,

then attempt to connect to the new network. However, if these two networks

are the same this command simply returns success and does nothing.

Examples:

connect name=Profile1 ssid=SSID1

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

So, using the example above we can create a simple command to force a connection attempt to the wireless network and this works regardless of wheter the profile is set to automatically connect or not, something we can’t do with the GUI. The command would be:

netsh wlan connect name=Guest ssid=Guest

screenshot4

Although the request was successfully received, this does not confirm that the network actually connected, but just keep an eye on the Network systray icon for activity or hover over it to see the status.

screenshot5

Now just put that command into a script or shortcut. I plan to play around with a Startup script that will execute a command for each of my 3-4 most used wireless networks to possibly automate it even more.

Update:

Ok, so the search for a final solution continues. I’ve discovered after a reboot that even the netsh command fails when a Wireless Connection Profile is set to auto connect. The command errors out with "The network specified by profile "PROFILE NAME" is not available to connect."

So I’ve left the profiles set to not automatically connect, and basically all I’ve accomplished is found a slightly faster way to connect to networks, yet still 100% manually, after starting up the computer. Ugh.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

PointBridge Blogs

More from this Author

Follow Us
TwitterLinkedinFacebookYoutubeInstagram