01-25-2006 07:23 AM
01-25-2006 07:43 AM
01-25-2006 08:14 AM
Thanks unc
That might work out for me ... my only question is - it will always show up as VCP#, but if the customer already has a virtual com port installed when they install mine, this will assign it a different VCP# correct, I still might be able to work with this but is there anyway to read the description part of the serial port like the way you see it in Device Manager (I'm assuming that the description probably comes from the driver for the device, maybe a dll call would do it for me)? Any way to do the same for components on USB?
Thanks again ... even if it doesn't fix my issue, it is a very handy routine for getting all sorts of information ... thanks
Greycat
01-25-2006 08:19 AM
01-25-2006 10:34 AM
ok ... this might work for me but it is goin to take some playing with to get the information I need ... the serial port one does not return my virtual com port ... but I have found my instrument under plugnplay - I'm not quite sure if the informatino I need (com port of the device through the virtual com port) will be in there ... thanks ... a couple of questions .. I assume that vbs scripting is enabled on Win2000 and Win XP machines by default ... is this correct? Can one turn it off? ... One other question ... how would you have a select statement with a where condition? Is this possible with vbs scripting? I attempted it but my SQL memory is pretty old ... any tips ... thanks agin unclebump this will come in handy for other things in the furture though I'm sure.
Greycat
01-25-2006 11:06 AM
01-25-2006 02:02 PM
I am attaching a VI which uses WMI to get the Serial Port Descriptions. I am also attaching a VBScript to do the same. You can get other properties of the SerialPort as well. See the MSDN link on the diagram.
Hope this gives you some ideas.
-Khalid
PS: This is a "quick-n-dirty" test VI. At a minimum, all references need to be closed, and errors handled, etc.
01-26-2006 01:42 PM
Hi Khalid,
Could you save that vi as a 7.0 format if possible. I'm curious how you called the .wsf file.
01-26-2006 01:48 PM
Hi UncleBump,
I am not calling the WSF script, but using .NET controls to query the WMI Class directly. Attaching the VI as 7.0 version.
-Khalid
01-27-2006 09:21 AM