Posts: 126
Score: 2
Joined: 7/13/2006
From: Australia
Status: offline
I had a quick look at wmi and here is a copy and paste of some scripts that scriptomatic produced.
This one tells you the port name and the instance name
This one tells you the instance name + whether the port is busy + a few other things.
Marry up the instance name/ port name to report if the port is busy which is probably an indication that the port has something active connected to it. As far as determining what that device is good luck. Serial ports are not plug and play so even the GUI can't tell what is attached. If you were looking for a specific device like a modem you may be able to craft a script to send AT commands to determine what sort of modem is connected etc.
< Message edited by Meg -- 12/18/2007 10:47:29 AM >