AFAIK, no, there is not built-in commands or anything you can do, you have to write/get a program to do it for you, there aren't any Dos commands for it.
What you CAN do is shut down the running program that controls the port, then the port will close. But, if the program won't show up in the control-alt-delete list, then, again, you need a program to intercede for you.




