18

I have a Wifi AP without internet access that allows me to access some devices at home. I want my Windows 10 to keep connected to that wifi network, but once Windows detects there is no internet, it insists on disconnecting from it.

I disabled "Connect Automatically" from all networks, but once Windows detects there is no internet it insists on disconnecting from it.

How can I keep Windows 10 connected to a network without internet access?


Edit: Looking at event viewer, I see this event every time it disconnects:

WLAN AutoConfig detected limited connectivity, attempting automatic recovery.

Recovery Type: 4
Error Code: 0x0
Trigger Reason: 3
IP Family: 0

Tried netsh wlan set autoconfig disable but this turns off the wifi network list.

Albin
  • 9,307
  • 11
  • 50
  • 89
Natan
  • 331
  • 2
  • 9
  • 1
    See if your Wireless Router is broadcasting when no Internet. If my Internet goes out, the connection to the router stays, but I get the Globe icon = no Internet. – John May 19 '21 at 00:06
  • Are you moving the Windows 10 device out of range of the Wifi itself (e.g. taking it outside your home)? – Anaksunaman May 19 '21 at 00:22
  • 1
    That's not normal behavior - check the WiFi adapter's Properties > Configure > Advanced tab settings, as well as Settings > Network > WiFi – JW0914 May 19 '21 at 02:41
  • 1
    I'm not moving. The wifi is close. If I open the route to the internet on that router, windows keeps connected so I don't think it has anything to do with the router. I just remove the default route and windows disconnects after 30 seconds or so. I added the event on the event viewer that appears here. – Natan May 19 '21 at 12:11
  • This sounds strange. Updating the WiFi driver might help. –  May 19 '21 at 12:32
  • Have you ever resolved this issue? I have the same issue with all of my Windows 10 devices, so I doubt it is driver issue as suggested by some. – Markos Jan 11 '22 at 10:54
  • 2
    I too am looking for a solution to this. Occasionally there comes a prompt that asks "do you still want to stay connected to this network even though there's no internet?" which seems to be the solution, but I haven't seen it since I reinstalled, and I don't know how to trigger it manually... – laggingreflex Apr 28 '22 at 00:06
  • https://superuser.com/questions/1195436/use-windows-10-wifi-hotspot-with-no-internet-connection – Gantendo Apr 28 '22 at 02:44
  • 1
    Ah, FINALLY! Exactly the question covering the problem I'm suffering from as well, and some real answers explaining details, unlike all these forum posts at answers.microsoft.com where the same "power settings? drivers? ..." is reiterated over and over again ;) – Michael Schumacher Jun 10 '22 at 09:41
  • Thank you for asking this question, and soliciting the answers below - it allowed me to answer the related question "Why does my WiFi hotspot disconnect all the time when I'm on the train." Patchy Mobile Data coverage, leads to disconnections. Thanks a bunch Microsoft. – MNB Jul 14 '23 at 16:51

2 Answers2

9

My favorite way: just add a registry value to the following key: Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\NetworkConnectivityStatusIndicator:

  • Name: NoActiveProbe
  • Type: DWORD (32bit)
  • Value: 1

Alternatively, expanding on Batuhan's last idea, this is how I implemented it:

  • I remapped both URLs to 127.0.0.1 via the hosts file, by adding those lines:

    127.0.0.1 www.msftconnecttest.com

    127.0.0.1 www.msftncsi.com

  • And installed a local webserver (XAMPP). There you just need to add a ncsi.txt to the (in my case C:\xampp\htdocs)

I had to wait a minute or so for the icon to change, but then it worked like a charm...

Albin
  • 9,307
  • 11
  • 50
  • 89
5

There may be some possible workarounds for this. You may disable the internet test and captive portal detection or make Windows believe there is an Internet connection.

After connecting to a network Windows tries to resolve the www.msftconnecttest.com address. If the query returns a response, it tries to fetch the contents of the http://www.msftncsi.com/ncsi.txt file. If this action fails Windows determines that there is no internet connectivity, or the ncsi.txt request returns different content then it concludes that there may be a captive portal.

You may disable this "probing" with a group policy, see the following page for further info: https://admx.help/?Category=Windows_10_2016&Policy=Microsoft.Policies.InternetCommunicationManagement::NoActiveProbe

I will also quote it here in case of information on the website is lost:

Registry Hive   HKEY_LOCAL_MACHINE
Registry Path   Software\Policies\Microsoft\Windows\NetworkConnectivityStatusIndicator
Value Name  NoActiveProbe
Value Type  REG_DWORD
Enabled Value   1
Disabled Value  0

It may be also possible to return the localhost IP for said domain name using hosts file and serve the same txt file but it's not that trivial to do so and may not work as desired.

Batuhan
  • 201
  • 2
  • 6
  • And that explains "Why my WiFi hotspot disconnects all the time when I'm on the train." Patchy Mobile Data coverage, leads to disconnections. Lovely... why do OS vendors assume your connectivity is going to be rock solid 100% of the time? – MNB Jul 14 '23 at 16:54
  • Applications may lose some packets due to fast network changes but it shouldn't lead to a total disconnect. The problem here is that Windows tests are slow and inconsistent but many applications ask the OS before even trying to reach their servers, which leads to situations where some applications report no internet without even trying. – Batuhan Aug 23 '23 at 10:10
  • 1
    @batuhan Major nuisance with Outllook. Even with on-premise Exchange servers it still refuses to work if the NCSI says "no internet". It doesn't even try, while everybody knows that the NCSI check is unreliable Even with the domain policy set to NOT CHECK sometimes Windows 10 (and 11) sometimes will still show the "No internet " icon. – Tonny Aug 23 '23 at 10:42
  • @Batuhan - the problem, for me, is not "fast network changes" and consequent temporary packet loss glitches ... its much more simple. There's no mobile reception in tunnels, so every time the train goes into a tunnel, or travels through another form of "not spot", my laptop drops the WiFi connection to my phone. Super annoying when trying to get work done on a multi-hour train journey. – MNB Sep 02 '23 at 09:00