h1

Windows 7 and the WiFi connection that wouldn’t connect!

January 19, 2009

I’ve had Windows 7 beta installed on my Lenovo S10 for a few weeks now and I’ve been constantly plagued by a problem with my wireless connectivity.  I set up my wifi connection to my router, and I selected the checkbox to automatically connect to the network whenever it is in range.  I could connect and disconnect from my wireless network all day long.  The problem would occur when I rebooted or shutdown.  When the machine would come back up, I’d have to manually connect to my wireless network again!  All the settings were there except for that checkbox to automatically connect.  Every reboot would reset that checkbox to be blank.  Which meant that every reboot would force me to manually connect again!

Finally, I think I found the solution.  I searched high and low in the registry and couldn’t find an appropriate registry setting to change that would force this automatic connection.  That meant that Windows must be storing the connection profile in a different place.  After using some file access monitoring tools, I narrowed it down to an xml file.  If you’re having a similar problem, either in Windows 7 or Vista, try the following steps:

1.  Go to the Start menu -> Control Panel -> Administrative Tools.  Double click on the Services icon to open the Services management console.

2.  Scroll to the bottom of the Services console until you see WLAN AutoConfig.  Right click on it and select Stop from the menu.  Wait until the service is stopped.

3.  Now, open Windows Explorer and go to C:\ProgramData\Microsoft\Wlansvc\Profiles\Interfaces.  You should see a directory or directories in there with long names like {FBDADD33-7552-4D1E-B3B0-71C6128AFE14}.  If you have multiple directories in here, then you’ll have to hunt for the correct directory.  Follow the next steps for each directory you have until you find the directory you need.

4.  Inside the directory with the long name, there will be an xml file with another long name.  You can double click on the xml file to open it and see it’s contents.  Inside the xml file are the settings for your wireless connection, including the name and various configuration settings.  If you have multiple directories from step 3 above, then you can open each xml file in each directory until you find the one that matches your wireless name.

5.  Once you find your xml file, open it in Notepad.  There will be one setting in that file that reads <connectionMode>manual</connectionMode>.  Change the word “manual” to “auto”, without the quotation marks.  Save the file.  Don’t change the name or the location.

6.  Now that the file is edited, we need to make sure that the SYSTEM account can’t change the auto setting back to manual, which is what was happening to me.  So we need to change permissions on the file to deny SYSTEM and Administrators from being able to write to the file.  Right click on the file you just saved and select Properties.   Click on the Security tab.  Click the Advanced button.  Click on the Owner tab and click on the Edit button.  Select your user account in the list and select Apply.  You now have full ownership of the file.

7.  After taking ownership, go back to the Permissions tab.  Click on the Edit button.  Remove the checkmark from the “Include inheritable permissions from this object’s parent”.  A dialog window will pop up.  In Vista, click on the Copy button.  In Windows 7, click on the Add button.

8.  Now you can edit all the permissions easily.  Highlight the SYSTEM account in the list and click on the Edit button.  Check the box to DENY full control.  All checkmarks underneath Full Control will move from Allow to Deny.  Now, we can’t deny ALL permissions because the system needs to be able to READ the contents of this file, so we need to move some of the checkmarks back over to the Allow column.  Check the box to Allow the following permissions:  Traverse folder / Execute file, List folder / read data, Read attributes, Read extended attributes, and Read permissions.  Pretty much any permission that says “Read” is good to go.  Just deny all the other settings that would allow SYSTEM to write or modify the file. 

9.  Do the same things in Step 8 for the Administrators account.  After you’ve changed the permissions for those two accounts, you can apply and OK your way out of all those windows.

10.  Go back to the Services management console and start up the WLAN AutoConfig service again.  Right click on the service and select Start from the menu. 

Now, your wireless connection should start up and connect automatically and it should survive a reboot.  My wireless connection is listed as Access Point.  I’m not sure if these settings would work for Adhoc networks or other connection types, but it’s worth a shot.  Any questions, let me know in the comments.

About these ads

12 comments

  1. Nice detective work!

    I’m going to give this a shot with an ad-hoc network I constantly use to share internet access from my cell to my car-pc. It would be nice not to have to manually connect all the time. At least Win 7 doesn’t constantly drop ad-hoc connections like Vista did.


  2. You have to enable wifi just in the ” mobility center ” nothing more . Connects right away .


    • @rix –

      I’m not quite sure what you mean by enable wifi in the mobility center. Wifi was enabled and it could see my wifi network. It just wouldn’t connect automatically, even though I told it numerous times to do so. In order to force Windows 7 to connect automatically to my home network, I had to manually change that setting in the file listed in the article. It wasn’t a matter of wifi being disabled. It was Windows 7 not changing a setting when I told it to. I haven’t had that problem since upgrading to the new 7100 build of the RC1.


  3. I went through these steps but I was already set at auto. My laptop finds the internet but cannot connect to my network. I don’t understand!


  4. My problem is not quite the same. My setting is already on “Auto”. But auto connect will not work not matter what I do. If I try to “Manage Wireless networks” after I put in the details I get “Access Denied”. I have taken ownership of every conceivable file on the computer. I have had Microsoft working on my pc remotely for 5 hours and nothing anyone has tried will make it auto connect wirelessly. I have 3 other xp machines connected wirelssly working perfectly but not so Windows 7. It did auto connect for 2 weeks and then suddenly changed – why? Any ideas? Anyone?


  5. Unfortunetely, this doesn’t work for Ad-Hoc networks. My Ad-Hoc network is already set to “auto” in the XML file, but Windows still refuses to automaticlally connect to it. This is very annoying because it prompts to enter the network key every time, which of course nobody can remember! So, to make this usable, you have to run an unsecured wireless network, or keep the network key written down with the computer. Nice security feature, Microsoft!


  6. well, i simply could not connect to wifi even after the reqd procedure.. any other detective work in process?????….


  7. Windows 7 and the WiFi connection that wouldn't connect! .Thanks for nice post.I added to my twitter.


  8. Sadly this didn’t work for me. My xml file was already set to auto and still it won’t connect automatically.

    A note on the above instructions: to find Administrative Tools in the Control Panel, you have to get out of Category view.


  9. i gone through these steps… my lappy have already these settings.. but not able to connect to WiFi.. is there any solutions .. i have lenovo Y410 please tell i just install window7.. after that cant access the net through WiFi..

    thanks in advance…


  10. What all should be in the xml file.
    could you post a sample?
    My file has a lot of setting such ssid but no mane after it.
    thank you very much


  11. Thanks so much. I’ve been angrily having to manually connect for months. I never could figure out why every time I would check the Connect Automatically box, it would revert to manual on restart. Thanks so much!!!! I’m glad someone figured this out…..microsoft was NO HELP! You da bomb!!



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: