Remove an unused/hidden network connection so that an existing name can be reused

10

3

How can I safely remove a network connection that is no longer visible in Control Panel\All Control Panel Items\Network Connections on Windows 10?

I want to reuse the name of a previously existing connection, "USB Ethernet", so that I can programmatically find this connection on multiple PCs if it exists.

When I try to rename one of the connections I get the following error message: "Cannot rename this connection. A connection with the name that you specified already exists. Specify a different name."

Example error

There are no hidden adaptors in Device Manager: https://support.microsoft.com/en-gb/help/315539/device-manager-does-not-display-devices-that-are-not-connected

Other posts mention editing the registry and removing the GUID that represents that specific connection under: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Network

However, this connection may be referenced in other places within the registry. How can I safely remove the connection and all its references?

There are many unused/hidden connections on my machine according to the registry: Local Area Connection* 11, Local Area Connection* 2, Local Area Connection* 7 etc.

matt.baker

Posted 2017-10-10T13:24:19.593

Reputation: 178

Answers

7

Remove hidden adapter: Proposed solution:

Steps:

1) Remove adapter from: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\NetworkSetup2\Interfaces

2) use https://github.com/jschicht/RunAsTI to grand needed permissions

yuliskov

Posted 2017-10-10T13:24:19.593

Reputation: 263

1Thanks! This WORKED!! – baburao – 2019-06-10T12:58:26.497

On the link there is also a mention of DeviceCleanup tool: https://www.uwe-sieber.de/misc_tools_e.html

That gem solved the issue for me without messing with regedit and permissions. After removing all unused Realtech xxx adapters, I was able to rename my active adapter back to the original adapter name. No reboot was required.

– broslav – 2020-02-18T11:22:49.900

3

There is a much easier way.

1- Open Device Manager and in View tab enable Show hidden devices.

2- Find the device linked to network interface you want to remove

3- Remove the device (it is not necessary to remove the drivers)

yurtesen

Posted 2017-10-10T13:24:19.593

Reputation: 131

1Unfortunately that didn't work for me (see original question) – matt.baker – 2019-08-12T11:29:13.093

1by far the most sensible approach – oldboy – 2019-09-05T04:49:08.763

@matt.baker The article you linked is for devices not connected. It says that you need to enable the hidden devices option in Device Manager to see them. I did this in my machine and I could remove the devices and corresponding invisible network connections. – yurtesen – 2019-10-06T19:11:02.180

0

For wired connection:

Type the command

netsh lan show profiles, press Enter to obtain all wired network profiles.

netsh lan delete profile name="WiredProfileName"

For wireless connection:

Type the command

netsh wlan show profiles

netsh wlan delete profile name="WirelessProfileName"

Besides that, go into the following registry entryL

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\Profiles

Find those unused network profile by right pane profile name, delete them(GUID).

Waka

Posted 2017-10-10T13:24:19.593

Reputation: 929

2Thanks for the idea. Unfortunately it's not showing the hidden connections, just the ones already displayed in the Windows Network Connections UI – matt.baker – 2017-10-11T09:17:57.357

were those wired or wireless network profile? Above netsh lan & netsh wlan would show all network profiles in your computer. – Waka – 2017-10-12T03:12:20.997

These were wired connections. When I ran the netsh lan show profiles command it only showed Ethernet and Ethernet 2. – matt.baker – 2017-10-12T05:36:59.657

go into the following registry entryL

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\Profiles

Find those unused network profile by right pane profile name, delete them(GUID). – Waka – 2017-10-12T05:55:08.427

2Sorry for the delay in responding. The registry location you mention doesn't list the connections I mentioned unfortunately (only profiles). It seems bad practice just deleting a GUID as I cannot be sure it isn't referenced in another placed leading to broken links. – matt.baker – 2017-10-18T11:43:45.147