Windows 10: Internet Connection Sharing on build 14316

Did you get stuck on “COM Surrogate” crashing while trying to configure Internet Connection Sharing feature in latest Windows 10 builds? Or WLAN Autoconfig (WlanSvc) service is crashing for you? Here, I present a workaround that worked for me.

Steps

Okay, so ICS is responsible for all this mess due to a bug (hopefully a known one). How to turn it off, or at least change its settings?

DISCLAIMER: On your own risk ;-)

In the registry, find the following key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SharedAccess

There, two values lay that have the power. One of them is PrivateIndex and the other is PublicIndex. They refer to the index of the source and destination network interface for ICS.

PublicIndex - interface from which you want to share Internet
PrivateIndex - interface that’s supposed to get Internet

Default of both of these values is 0xffffffff, which means that ICS is not set for any interface. With these defaults, ICS will not crash. But, ICS crashes when trying to access and modify both PublicIndex and PrivateIndex when it’s already set to some real value. If you delete both of them, they will get recreated, but you get a chance to enable/disable ICS properly. Note that after you set the interface again using the dialog, any subsequent attempt the will trigger a crash, unless you delete both of mentioned registry values again.

So, your best bet (for this build) is:

  1. open the dialog with network sharing
  2. delete the mentioned values from registry
  3. apply your changes in the dialog.

So, for example, when you want to turn ICS off for Ethernet 1, you shall:

  1. open the Properties of Ethernet 1, go to Sharing,
  2. then delete the above-mentioned registry values,
  3. and only then disable (and confirm) the sharing using the dialog. That way, it should be (hopefully) safe.

That’s all. :-)

Positive side effects

Disabling ICS will also fix one half of your woes with Miracast. For some reason (I guess for DHCP server), ICS is also running when you connect to a wireless display (like MS Wireless Display Adapter). And when ICS’s shutting down after that, WlanSvc crashes because of the completely same issue. Thus, disabling ICS by following this workaround will circumvment the issue.

MS Wireless Display Adapter