We have built an application that runs in a sort of kiosk mode on Windows 7 for a customer and when the PC boots up it launches the application and the user can't access anything other than the application. Everything else is locked down.

One of the issues we have with this, is the customer uses 'The Cloud WiFi' which uses a captive portal to login to the network and give internet access. But they have no way of accessing a web browser on these setups.

Is it possible to have the PC auto-login to a captive portal on boot?


1 Answer 1


Yes. You can make a script that logs in to the WiFi in the background triggered by connecting to the WiFi.

First, get the version of lynx - a text based browser - with SSL support. Next, generate a cmd_args script file by logging in to the WiFi with lynx once, and logging the input. Do this by calling lynx with the following argument:

lynx.exe -cmd_log=%USERPROFILE%\lynxlog.txt`

Then you can rename that file and call lynx with it as an argument to reproduce the keystrokes:

lynx.exe -cmd_args=FILENAME_HERE

Put this in a batch file. (Either use the full path to the lynx executable or set that path in the PATH environment variable.)

Next bundle those two files with iexpress.exe, with all options optimized for running hidden in the background.

Next, make a scheduled task triggered by event id 10000 in source NetworkProfile of log Microsoft-Windows-NetworkProfile/Operational which calls the bundled executable:

Task Scheduler trigger example

Also, make sure the scheduled task is set to run even if the user isn't logged on. Once you authorize that, it should have the desired effect of logging in to the WiFi automatically without any user input.

Source: My article on How to Automate Captive Portal Login.

  • If you can work out the the form fields from the captive portal, you can do this straight from Powershell using the Invoke-Webrequest cmdlet - this is a bit like curl or wget but built into windows. So you can make a one-line command like Invoke-WebRequest -Uri 'https://portal.url/login' -Method Post -Body @{username='foo'; password='bar'; login='Login'} and use the scheduler to trigger that
    – askvictor
    Dec 2, 2020 at 4:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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