ideally you want to fix the problem so the opening doesn't hang. This could be part of a badly written driver that's still installed, if so, there's probably very little you can do other than not using those com ports.

You can try to delete/uninstall the offending ports and the old IO card in the Device manager of the control panel then allow windows to autodetect the actual com ports. I have seen some hard-persisting driver issues that needed a reformat and reinstall of windows to fix though.