How can I remove a hidden com port in Windows?

Sometimes when working with virtual com ports on Windows it may be necessary to uninstall/remove or modify a hidden/ghosted device. The following procedure will allow ghosted/hidden devices to be shown in Windows device manager.

Click Start

Click Run

Type cmd.exe in the textbox and click OK

Type set devmgr_show_nonpresent_devices=1 and hit ENTER

Type cd\windows\system32 and hit ENTER

Type start devmgmt.msc and hit ENTER

When the device manager opens, click the View menu

Click Show Hidden Devices

Click on the + sign next to the Ports to see the full list of Com ports being used

Right click on a com port to remove or modify it

For advanced users who want to make step 4 permanent, go to Windows Control panel/advanced system settings/environment variables…/ and add a new variable as follows

Variable name: devmgr_show_nonpresent_devices

Variable Value: 1