How to prevent explorer.exe to get laggy when some network paths are not available?

1

1

I have set up some network path in Windows 8.1 which can only be accessed when I'm connected to a VPN. I don't want to re-map/add them every time when I connect to the VPN (I do this quite often).

If I'm not connected to the VPN, however, explorer.exe gets very laggy. I can fix the issue by disabling the "Client for Microsoft Networks" in the properties of the network adapter (see https://superuser.com/a/390043). But then I can't access any network path. This is even worse, because then I can't access my locale network path which I need always, of course.

I tried it with both ways: mapping a drive letter to the network path or using the full name. Problem exists in both cases.

Another annyoing thing is: when drag-dropping a file between two explorer windows and randomly hovering the non-available network path "half-way" (because it's in the list that teh mouse cursor needs to pass) while dragging lets the explroer.exe hang for ~3-5 seconds as if crashed.

How do I set up Windows to not get laggy when having non-available network paths without disabling the network path functionality at all?

With "laggy" I mean two things:

  1. all programs accessing filesystem using Windows own Open/Save dialogs "hang" for ~3 seconds
  2. I have to hit F5 after each filesystem operation in Explorer (copy, move, etc.), see Explorer does not auto-refresh

Foo Bar

Posted 2014-10-05T14:38:46.770

Reputation: 1 270

Placing this as a comment rather than an answer, because it does not answer your question, but rather is a workaround. Have you considered creating a batchfile to map and unmap your network drives? Launching the batchfile could be all you need to toggle this on and off. – LPChip – 2014-10-05T14:41:51.103

Also, can you define "laggy" Because on my company laptop running windows 8.1, windows does not get "laggy" when the network paths aren't found, which indicates 2 things: or the problem you have is weird and shouldn't happen, or our definitions of laggy aren't the same (I expect the last one) – LPChip – 2014-10-05T14:43:29.297

@LPChip for laggy see my question, I edited it. A Batch file would be an annoying hack that I will only do if there's really no other "clean" solution. The problem stops as soon as I'm connected to the VPN (I only connect when I'm working, always-on is a no-go) or remove the network path in Explorer (a no-go, because I need it often). – Foo Bar – 2014-10-05T14:49:14.703

Answers

0

I solved it now this way. I added a firewall rule to the Windows firewall (incoming and outgoing with the same name) and enable/disable it via batch file with netsh advfirewall firewall set rule name="rulename" new enable=yes (resp. no). This works now perfectly fine.

Foo Bar

Posted 2014-10-05T14:38:46.770

Reputation: 1 270

0

You can use c:/windows/system32/drivers/etc/hosts file to block the VPN destinations. For example, add these lines will block vpn-computer1 and 2:

127.0.0.1        vpn-computer1
127.0.0.1        vpn-computer2

When VPN is connected, these entry needs to be removed, which can be done with a batch file.

Dummy

Posted 2014-10-05T14:38:46.770

Reputation: 66

And it requires restarting the computer each time it's changed. -1 – Canadian Luke – 2014-10-05T20:34:59.697

2No, it does not require reboot. I literally just tested on my computer, windows 7 pro. Please verify your claim before down vote. – Dummy – 2014-10-05T20:38:25.473

Thanks, I'll try that and report back afterwards (and accept if it works well). – Foo Bar – 2014-10-07T20:37:00.530

No, this won't work, because I need to block IP addresses, not domain names. So, I need a way to configure the Windows firewall via batch file to (dis)allow on VPN (dis)connect. – Foo Bar – 2014-10-11T11:59:29.790