Posts: 2,339
Threads: 104
Joined: Apr 2009
I've recently come to discover a wonderful "feature" in Windows, been there forever from what I read that I had not been affected by it until very recently. The feature I speak of is the serial port demon.  In short, M$ in their infinite wisdom (I'm sure some engineer thought this was a good idea) will automatically assign an input device to a serial port streaming recognizable data to the port when the operating system boots. And it's random, so if you boot and there happens to be no data coming in port at the time of initialization the system starts normally and the CQC driver serial port assignment(s) work correctly. However if you are really lucky then the undesirable assignment occurs and boom the driver doesn't work since it can't obtain it's assigned serial port.
I'm thinking about trying a delayed start on the serial port device service and CQC to see if I can trick Windows to not do the undesirable assignment.  
Dean, which service(s) would I need to delay along with the serial port service to test this theory out?
BTW this is a brand new system with performance room to spare, it's probably too damn fast.
I'm also considering a different serial input method, like a multi-port card (I need 7) but they are big $$$ for anything of quality.
Posts: 40,483
Threads: 491
Joined: Aug 2002
Couldn't just just disable the serial port service altogether? I'm assuming nothing you are doing actually depends on it, right?
Dean Roddey
Explorans limites defectum
Posts: 2,339
Threads: 104
Joined: Apr 2009
No, I need the port(s) for my CQC device drivers. Windows falsely assigns a bogus device it thinks is correct to one or more serial ports thus preventing the driver in CQC from starting up correctly, it sits at a Waiting to Connect for the device status.
Which CQC service(s) do I need to put on delayed start to test this out?
Posts: 40,483
Threads: 491
Joined: Aug 2002
Oh, you mean it assigns a device name to the ports? If so, yo should be able to make it stop doing that. If you go the device manager and find the serial ports, right click and tell Windows what you know to be the right COM port names. I'd think that should make it happy, right?
Anyhoo, there's only one service really, the application shell. Delayed start is one of the install options these days, so just run the installer and select delayed start to have it be permanently that way.
Dean Roddey
Explorans limites defectum
Posts: 2,339
Threads: 104
Joined: Apr 2009
It's not a name, it's a bogus device, for example, a Microsoft Stylus. I've actually disabled that particular one but now something else is grabbing the damn port on occasion and it's not showing up in the device list (tried showing hidden devices as well, no dice.) M$ is assigning a device based on a stream pattern it is seeing on the port. Lucky me, either my DSC Alarm, UPB or Zwave serial ports can all manifest this problem. None of these serial devices utilizes any sort of hardware handshaking so when the the PLC spews serial data Windows at boot time sees it and tries to interpret and assign what it thinks is the correct device with no easy way to prevent said helpfulness.
As a manual hack I can disable the serial port(s) that are hijacked, pause the CQC driver that is victimized by the drive by port snatch, re-boot, re-enable the serial port, resume the CQC driver, everything happy. (except for me, I'm not happy as this is a PITA)
I'll try setting delayed start manually first before rerunning the installer to set (never noticed that before)
I'm surprised more people aren't seeing this but then again given it's randomness maybe it's attributed to a temporary glitch and goes away if the system is restarted.
Posts: 40,483
Threads: 491
Joined: Aug 2002
But, wouldn't that make it worse? You are putting off CQC's startup even longer, giving whatever it is a chance to grab the serial port, right?
Are you sure it's what you think it is grabbing the port? I think there's a way to see what process has a port open. Worst case it could give you clues as to what to service to stop. Looks like the PortMon utility from their SysInternals toolkit will do this:
https://technet.microsoft.com/en-us/sysi...96644.aspx
Dean Roddey
Explorans limites defectum
Posts: 40,483
Threads: 491
Joined: Aug 2002
Some other discussion indicates that it will be often seen as a serial mouse. So, go to the device manager and check if a serial mouse is there. If so, don't uninstall it. Disable it, so that it won't try to reload the driver again, and it wont' try to take over the serial port again.
Those folks also said that this only happened if the device was connected at startup and causing serial data.
Dean Roddey
Explorans limites defectum
Posts: 2,339
Threads: 104
Joined: Apr 2009
(02-20-2017, 12:52 PM)Dean Roddey Wrote: But, wouldn't that make it worse? You are putting off CQC's startup even longer, giving whatever it is a chance to grab the serial port, right?
Are you sure it's what you think it is grabbing the port? I think there's a way to see what process has a port open. Worst case it could give you clues as to what to service to stop. Looks like the PortMon utility from their SysInternals toolkit will do this:
https://technet.microsoft.com/en-us/sysi...96644.aspx
The test will be to delaystart both the serial port service for the USB serial devices I have as well as CQC.  In theory Windows will have finished booting and it won't pick the port up.
Thanks Dean, I'll try the portmon but it looks like it's just going to tell me what is flowing, not what app / service has control of the port.
I believe I have already also disabled serial mouse though It's not showing up in the device list (show hidden to see disabled items)
Posts: 40,483
Threads: 491
Joined: Aug 2002
I think PortMon shows the process. If it doesn't, then the Process Explorer from SysInternals will.
Dean Roddey
Explorans limites defectum
Posts: 40,483
Threads: 491
Joined: Aug 2002
Any luck?
Dean Roddey
Explorans limites defectum