Search code examples
browserautomationwindows-10wifi

How to disable automatically browser opening on Wi-Fi hotspot connection for Win10?


When I connect my laptop to a free/public Wi-Fi hotspot (FreeWifi, Orange...), Windows 10 opens automatically my default Web browser and goes if possible to the ISP captive portal. So each time I connect to the Wi-Fi SSID my browser is opened.

Quite good for a normal usage, but not for web browser testing!

How can I disable the action that opens the browser each time I connect to the Wi-Fi hotspot ?


Solution

  • One solution I found is to modify directly a Windows regitry :

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NlaSvc\Parameters\Internet\EnableActiveProbing

    And to do it from a Batch script, I purpose this :

    reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NlaSvc\Parameters\Internet" /v EnableActiveProbing /t REG_DWORD /d 0 /f
    
    • REG ADD : add/modify a registry;
    • Then specify the repository of the registry;
    • /v EnableActiveProbing : indicates the value to modify;
    • /t REG_DWORD : indicates type of value;
    • /d 0 : gives the data to add;
    • /f : to force changes.

    (More help with REG ADD /h)

    It works fine on Windows 10 with admin rights. Hope it will help some people.