Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 have a WI-FI network at the office that requires logging in with a captive portal (requires logging in with username and password).

I would like to somehow run a script that automatically logs in as soon as I connect to the network (without having to start my browser and keep it open).

Oddly enough, I managed to find such a client for Android (CoovaAX), but not one for windows (I have Windows 7, if it matters).

Does anybody have a simple solution for this? I'd rather not have to spend time to code my own tool for this.

share|improve this question
Has anyone released a program to solve this problem in the intervening two years? There exist reasonable solutions for Android (…) and iOS). – Jess Riedel Apr 24 '14 at 19:35
Also, Meta: how do I draw attention to this question? I can't ask my own version since it would be a duplicate, but the answer here is completely out of date and I would like fresh eyes to take a look. – Jess Riedel Apr 24 '14 at 19:36
up vote 4 down vote accepted

I don't know about simple... I use a tool called in order to test web sites. It's a perl script that allows you to specify inputs and expected results and could easily be configured for this. It might take you an hour to make it work.

As for how to automate it. The Windows Task Scheduler is pretty robust and can trigger on a myriad of events. You could tie it to a logon event or event log entry, or simply have it run every 5 minutes (that's a bit painful). For instance, I get an event 32 in the system log when I establish a network connection. That might do it.

share|improve this answer
Thanks. I don't know if this solves my issue completely, I guess it could connect to the site and send my credentials, but I'd still need to automatically fire it up when I connect to the company's wifi network. Any idea how to do that? Could I catch an event with Scheduler, perhaps? – Assaf Stone May 31 '12 at 12:49
I added more detail on triggering it. – uSlackr May 31 '12 at 14:31
@uSlackr Would you be able to provide the code you used for this? – Cameron Mar 16 at 11:31
@Cameron Which code? The is available for download. the XML config file will be specific to your use case. – uSlackr Mar 17 at 15:27
Yeah could I see the XML as an example? Thanks – Cameron Mar 17 at 20:58

I've done this in the past with Windows task scheduler and a php+mysqllite script. The php+mysqllite script just checked to see if it could reach google, if it got redirected, it checked to see if it had a routine for the domain it got redirected to, if so, it ran it. The mysqllite was to keep the cookies for the headless browser I implemented in php. It would probably be a lot less work to just use a greasemonkey equivalent to do the log-in. (with the down side being the browser would pop up and do things every time your scheduler gets tripped.)

The task scheduler trigger will vary from machine to machine. I had one laptop that would log wifi connections as events and they included the ssid so I could filter to only trigger on the ones I cared about.

On my current laptop, it seems the only event that reliably gets fired is the DHCP client connect. Of course, this fries every time I get an IP address and doesn't tell me an SSID.

You can check what events are available for you to trigger off of with the windows event viewer. I just turned on and off my wifi 3 times and checked what events were triggered 3 times in the last hour.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.