/build/static/layout/Breadcrumb_cap_w.png

How to change COM-port with script?

Hi,

I have a MSI (mobilink.msi) which installs drivers for a UMTS/HSPDA-modem.
However after installation the modem is installed at COM6, but this port is already used by another application, so we have to change the COM-port manually to COM8.
I have tried to capture this change, but I did not succeed.
So does anyone knows a script to change the COM-port for a device/modem?

0 Comments   [ + ] Show comments

Answers (7)

Posted by: anonymous_9363 16 years ago
Red Belt
0
ORIGINAL: Jemboy2004
I have tried to capture this change, but I did not succeed.
In all likelihood, whatever you used to capture had the relevant files/registry keys excluded.

Use ProcMon - with 'Enabled advanced output' switched on - as you change the COM port: that will definitely tell you what goes on during the change.
Posted by: aogilmor 16 years ago
9th Degree Black Belt
0
ORIGINAL: Jemboy2004
I have a MSI (mobilink.msi) which installs drivers for a UMTS/HSPDA-modem.
However after installation the modem is installed at COM6, but this port is already used by another application, so we have to change the COM-port manually to COM8.
I have tried to capture this change, but I did not succeed.
So does anyone now a script to change the COM-port for a device/modem?


Look into the Win32_PortResource and Win32_PortConnector classes in WMI. I'd be surprised if there wasn't a utility somewhere to locate free com ports, you could add that to the mst as a custom action. Try to locate where it sets the com port and see if the value can be replaced by a property. Does the string COM6 exist anywhere in the MSI?
Posted by: anonymous_9363 16 years ago
Red Belt
0
ORIGINAL: aogilmor
I'd be surprised if there wasn't a utility somewhere to locate free com ports,
Hi, Owen. I found any number of ActiveX controls in a Google search and presumed the OP would have done the same. From what I gather, though, they are almost exclusively to allow script control of stuff like a port's baud rate and so on. I would imagine that the setting for this app would likely be some custom registry setting anyway.
Posted by: aogilmor 16 years ago
9th Degree Black Belt
0
ORIGINAL: VBScab
Hi, Owen. I found any number of ActiveX controls in a Google search and presumed the OP would have done the same. From what I gather, though, they are almost exclusively to allow script control of stuff like a port's baud rate and so on. I would imagine that the setting for this app would likely be some custom registry setting anyway.


Hi Ian, yeah, I was just wondering though why COM6? That seems strange, and kind of weird that it would be in use. I thought COM ports were pretty much obsolete by now since things are all USB and high speed network ports. So maybe it is hard coded somewhere and could be changed by a property. All he really needs to do (presumably) is read the first available free com port and let the MSI property do the rest....maybe, if it's that easy [:)]
Posted by: Jemboy2004 16 years ago
Senior Yellow Belt
0
I believe every communication device even if it uses USB, uses COM-ports. Mobilink is a driver software for a UMTS modem thus it uses a COM-port. The problem I have is that the other software (GPS) uses COM6 (I can not changed this). However because during the RIS, the dockingstation with the build-in GPS-mouse is not connected, COM6 seems free, and Mobilink (Vendor Package) installs on the first free COM-port. Because this causes conflicts when the laptop is connected to the dockingstation and the GPS-software is activeated, we manually change the modem port to COM8.... but ofcourse I would prefere to do the COM change using a script. I have looked at the MSI, but I haven't found a property to set the modem port (yet)....

I had a look at WMI earlier but the the COM settings seemed more read-only, but I'll have another look lateron. Thanks for all your help so far!
Posted by: anonymous_9363 16 years ago
Red Belt
0
I think you may be making this more complex than it actually is. I think you can avoid the mess of actually talking to and setting the COM port: all you need to find out is how this application records the port it's to connect to. In that case, as I originally suggested, ProcMon will show you that happening as you switch between them.
Posted by: aogilmor 16 years ago
9th Degree Black Belt
0
did you search for COM6 within the MSI?
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ