Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I often tether my laptop through my iPhone to go online when I'm out and about.

Right now I do this manually by looking at the list of available Bluetooth devices and choosing "connect using access point" from the menu bar.

Is there a way to automate this so that my laptop just connects to the phone automatically if there's no regular WiFi present? If it can't be made fully automatic, I'll happily take a script or something similar that at least makes it easier.

share|improve this question
probably going to want to write a script or AutoHotkey... – studiohack Jan 16 '12 at 17:33

If you are willing to go the scripting route, then your best bet would be to write something in Windows PowerShell. PowerShell features a powerful scripting language, with numerous cmdlets to allow access to nearly every feature of the OS.

Unfortunately, the script would be highly dependent on the drivers of your wireless card, NIC, and bluetooth card, so there isn't a one-size-fits-all solution.

You'd probably need to first query the status of the wireless network (this thread includes a lot of information on this).

Now, this article might be useful to you for controlling your Bluetooth adapter, but you may be forced to interface with the adapter at the driver level since no standard API exists (outside of Winsock).

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .