Skip to main content

Save and automatically connect to an ad-hoc network in Windows 7

This could probably be the ULTIMATE solution! Post a comment if it has helped you!

With each new Windows version, Microsoft has unfortunately chosen to make life harder for people who use ad-hoc networks to connect computers together without the use of a middleman (the router). In Windows Vista, one could choose to save the ad-hoc network one is connecting to.

But with Windows 7, not only is there no way of connecting automatically (well actually there is a shortcut for that, as below), but now one cannot save an ad-hoc network that one is connecting to. (One can only save an ad-hoc network one is creating in the host computer.)

The biggest annoyance is that every time one connects to an ad-hoc network as a guest, one has to enter the password (network key) again. All of these problems can be solved with the steps below.


To save an ad-hoc network and its network key on the guest computer (running Windows 7)

  1. Note down the SSID, security type, encryption type and the key of the ad-hoc network.
  2. Disconnect your connection to any wireless network and switch off/disable your wireless device. Turn on/enable your wireless device but don't connect to any network. (Thanks GK.)
  3. Click on the network icon in the taskbar.
  4. Click Open Network and Sharing Center > Manage Wireless Networks > Add.
  5. Click "Manually create a network profile". (This may look silly but we really are going to create an infrastructure network now.)
  6. Enter the network name (SSID), security type, encryption type (if any) and the key that you noted in step 1.
  7. Uncheck both checkboxes ("Start this connection automatically" and "Connect even if the network is not broadcasting".) [Note that you cannot have the connection start automatically. If you try to have it checked, step 10 will fail. A different way to start it automatically during system boot is described below.]
  8. Click Next > Close. Your connection must appear in the list with the icon suggesting infrastructure (two big screens connected to a tube). Don't worry about it.
  9. Click Start, type in "cmd" in the search box, press Enter.
  10. In the Command Prompt, type in "netsh wlan set profileparameter name=NetworkName ConnectionType=IBSS", exactly as shown, without quotes, except you must substitute NetworkName with the SSID (network name) of your ad-hoc network.
  11. If everything went well, you'll see that the icon has now changed to an ad-hoc icon (three small screens connected to each other) in the Manage Wireless Networks window.
  12. Turn on/enable your wireless device, and try connecting to the Ad-hoc network. You will notice that you no longer need to enter the network key.
To automatically connect to a saved ad-hoc network during Windows boot (can be applied to both guest and host computers running Windows 7)
  1. Click Start > point to All Programs > right-click Startup > click Open. (You may choose Open All Users instead if you prefer).
  2. Right-click an empty space and click New > Shortcut.
  3. Type in "netsh wlan connect NetworkName". Once again, NetworkName must be substituted with the SSID of your ad-hoc network.
  4. Click Next and enter a fancy name such as "Connect to NetworkName" or something like that.
  5. Click Finish and you're done. This shortcut will run when Windows starts up, giving you a very brief flash of the black command window, followed by your computer connecting to the ad-hoc network if it is available. Tip: You can also pin the shortcut in your taskbar or copy it to the desktop to easily connect to the network any time you want.
Note: You will probably need Administrator access to complete some of the steps above (in both procedures).

Random trivia: I kept typing ad-hock instead ad-hoc throughout this post.

Comments

  1. This totally works. I didn't need the first part because I was connecting Win 7 to XP(Win7 hosting), but the second part worked.

    To automatically connect to a saved ad-hoc network during Windows boot (can be applied to both guest and host computers running Windows 7)

    Thanks so much.

    ReplyDelete
  2. Absolutely brilliant :)
    But one small thing. 4) is not possible if wifi is disabled, so i had to keep it enabled. No idea how you managed to do this with wifi card disabled ;)

    Anyway, thank you!

    ReplyDelete
  3. Thanks for the heads-up. You're right, the option goes missing when I disable my Wireless Adapter (WiFi Card).

    ReplyDelete
  4. Brilliant! Works like a charm, thanks so much!

    ReplyDelete
  5. Works Fantastic! Only caveat was where the final shortcut had to reside to run at boot. It had to go down into the "Programs" "Startup" Folder.

    ReplyDelete
  6. Doug, you can put the shortcut anywhere, even multiple places. The purpose of putting it in the Startup folder is to make it run at boot (Windows startup to be specific), but you can obviously have a second shortcut on the Desktop or Quick Launch if you wish to run it at will.

    ReplyDelete
  7. You can also just "recreate" the ad-hoc connection on the "receiving" computer at step 5.
    Only caveat, you must ensure the ad-hoc connection is no longer available to connect to (i.e, put the first computer to sleep, or turn off your printer if it's an ad-hoc printer).
    Otherwise, it won't let you create the connection.
    This way, you actually don't even have to do step 2 at all, but it's important that you use the same name, security type and password.
    Once you complete 'creating' the ad-hoc network, the computer will say "waiting for users", just wake (or power on) your other devices, and TADA!
    And next time you try to connect, you won't need to enter a password anymore.

    ReplyDelete
  8. I just found a much simpler way!
    Just follow the "Manually Create" steps.... Then click "Copy this network profile to a USB flash drive.
    Go to the flash drive, the only directory should have a WSETTING file of type "WFC", as well as a text document of the same name. Editing the text document does nothing, but use notepad to edit the WFC one. Replace ESS with IBSS in that doc and save the file.
    Remove the wireless connection that you added in the network and sharing center, and then just remove/insert the flash drive. It will autorun and offer to install a working profile!

    ReplyDelete
  9. Thank you. You saved me from wasting time everyday. :)

    ReplyDelete
  10. Hi, it works with Windows 8 x64 too. Network center changed a bit, you need to choose
    Open Network and sharing center
    1. Setup new connection or network
    then
    2. Manually connect to a wireless network

    ReplyDelete
  11. Thanks ADTC, this totally solved my issue.

    ReplyDelete
  12. You're great! It works perfectly!

    ReplyDelete

Post a Comment

Comments are moderated, and are usually posted within 24 hours if approved. You must have a minimum of OpenID to post comments.

Popular posts from this blog

Disable auto save in JetBrains IDE software (IntelliJ IDEA, PyCharm, PhpStorm)

JetBrains provides the following IDE software:
IntelliJ IDEAPhpStormPyCharmRubyMineWebStormAppCodeCLion Google also provides Android Studio which is powered by the IntelliJ platform.

If you come from a different IDE such as Eclipse, you will be unpleasantly surprised to find that JetBrains-branded IDEs automatically save everything the moment you look away. The proponents argue that as you work on your project, you should not have to worry about saving files. But to others, this auto-save behavior which is enabled by default is a curse that catches them by surprise, and a shocking departure from the workflow they are very much used to.

You can change the behavior by altering some settings.

Stop having to click Unblock on every downloaded file

CAUTION: The blocking of downloaded files in Windows is a security and safety feature to help prevent your computer from being infected by viruses and other malware. Only disable this feature if you know what you're doing.

I had been plagued by this annoyance since the days of Windows Vista. Any downloaded file, no matter what browser I use, gets tagged as "blocked" by Windows. You can open downloaded documents even though they are blocked, but when you run a downloaded application (such as a setup file) you're presented with a "Security Warning" before you're allowed to run it. It's worse if you extract a downloaded ZIP file with the Windows' built-in ZIP management. Every extracted file is blocked by default.

Being a geek who finds unnecessary "security" prompts annoying, the first thing I do in Windows is to disable the User Account Control (UAC). But I couldn't quite figure out how to disable blocking of downloaded files until …

How to change default and internal currency in self-hosted Odoo or OpenERP

If you wish to use Odoo in a single-currency environment, you will find issues changing the currency in the Odoo interface itself. If you have a self-hosted solution of Odoo or OpenERP, you already have unprecedented control over the system, unlike the cloud-based solution from Odoo. This means that you can very easily fix the issue by hacking the database that Odoo is relying on. Even in a multi-currency environment, you can use the same trick to change the global default currency - the fix is very clean for any environment - there is just an extra step to update the currency rate settings.

Even in the latest version of Odoo, we still face the ridiculous bug that Odoo internally ALWAYS uses EUR (Euro) as the internal currency. This has created many problems for many users wanting to use a different currency. Despite being set to a different currency from the Odoo interface, the eCommerce site, reports, accounting, etc are still shown using EUR and the Euro symbol, creating confusion…