-2

If you go to the network adapter settings in Windows, right-click an adapter, and click "Properties", you can see all supported protocols, configure, activate and de-activate them. I added a photo how this looks like, if your system language is German.

image

I want to de-activate the IPv6 protocol for one of the network adapters, but I want to automate the process, so that another user does not have to do this procedure if they execute my program (with admin rights).

Is there any way to achieve this? I know that there is a way to do this in the Registry, but it affects the whole system and not single adapters (and needs a reboot, which I want to avoid). I also looked for a netsh command, but did not found one.

Remy Lebeau
  • 555,201
  • 31
  • 458
  • 770
ixolius
  • 202
  • 1
  • 11
  • start SysInternals Process Monitor, set it to monitor registry changes, stop monitoring and clear log. Open this window, clear the check. Then as fast as you can - restart monitoring, click OK, and as the window disappears stop the monitoring again. Read the log and find the key changed. Also, try searching for WMI interface, perhaps it can work too. – Arioch 'The Mar 12 '21 at 17:32

1 Answers1

1

I also looked for a netsh command, but did not found one.

Only tested on windows 10 system, you can use Disable-NetAdapterBinding to disable a binding to a network adapter.

Enter the following command line in PowerShell(run as admin),

disable-NetAdapterBinding -Name 'Ethernet' -ComponentID ms_tcpip6

Ethernet is the name of the adapter you need to disable.

Strive Sun
  • 5,988
  • 1
  • 9
  • 26