2011-07-01

com0com signed drivers

If you are using VMware to play with virtual serial consoles on Windows, and especially if you want to have access to that console right from the start, a very nice tool to have is com0com, which is a null-modem emulator that creates a pair of connected virtual COM ports.
VMware does of course offer the possibility to use a named pipe, but you can only connect to it after the image has started running, which may result in bootup messages being truncated. And if you use the VMware option of directing serial to a file, then you can no longer interact.

Com0com solves this problem nicely by creating a pair of virtual COM ports, that are always available, and that you can use with VMware on one end, and putty or HyperTerminal on the other.

The only problem however is that, as of version 2.2.2.0, the current com0com drivers are unsigned. However, since I had a driver signing certificate begging to be used (before it expired), I have now made a signed version of the drivers available, so that you can easily install com0com without having to change the boot properties of your Vista or Windows 7 installation.

The signed 2.2.2.0 com0com drivers can be obtained here. They are compatible with any Windows 10, Windows 8.x, Windows Vista or Windows XP system.


Important Note: It is not because the signing certificate for the com0com driver above is now expired that this driver is invalid and/or should not be used. Timestamping was used at the time of the signature, therefore the driver package above is exactly as good as one using a non expired certificate. If signed driver packages ceased to be valid after the certificate expired, this would close the door for developers using a code signing certificate that they renew on a yearly basis, as it would require their users to upgrade their driver of applications every single year, which is of course nonsense. In short, regardless of what the expiration date on the certificate is, this driver package is no less usable or less safe that one with a non expired certificate.

Note that I stripped the GUI installer, so only the commandline one is available. Even with commandline, the installation is very easy however. All that you need to do is:
  1. Download and extract the files (using 7-zip if needed)
  2. Open an elevated command prompt in the i386\ (32 bit) or x64\ (64 bit) directory
  3. Run the command:
    setupc
  4. Enter the install command:
    install - -
  5. Accept the prompts.
Once the driver is installed, two connected COM ports will be created: CNCA0 and CNCB0, which you can use, one with VMware, and the other with putty.

Now you don't have to miss any bootup messages and you can use an interactive COM port that persists regardless of the power status of the virtual machine. Enjoy!

32 comments:

  1. Hi. You came top of the list when I Googled for a signed version of com0com. Thanks.

    On my development PC I put Windows into Test mode and ran the standard (unsigned) com0com installer. That installed the .sys file in the Win/drivers folder and created various registry entries which I assume are needed i.e. it does a full install.

    How am I meant to install the signed copy you provide in a way that is consistent with a normal com0com install? Do I even need to? Should I install the .sys file in the Win/drivers folder and attempt to work out what registry entries com0com creates on install, then recreate them with my own installer? Or should I just XCopy your files into a sub dir of my application, run the usual "setupc.exe install" commands and hope they work?

    Any clarification would be appreciated. Cheers.

    ReplyDelete
    Replies
    1. This comment has been removed by the author.

      Delete
  2. Hi SomeName,

    The procedure above is consistent with the standard com0com install, as com0com also provides a non GUI installation mode. Simply running setupc install will produce the same results as installing the com0com in GUI mode.

    ReplyDelete
  3. I downloaded and installed your version of com0com on a Windows Server 2008 R2, but the drivers appear as being unsigned when installed and no COM ports are added. Already during install does Windows say it can't verify the publisher of this driver. :(

    ReplyDelete
  4. I have the same problem on a Windows 7 Professional 64bit. Appears as being unsigned and don't work.

    ReplyDelete
  5. I tested again on a new Win7 x64machine, and it works for me. Be mindful that:
    1. Since the inf file is not signed, you will get a security warning. This is normal
    2. You must run setupc.exe from either x64 or i386 depending on whether you are using Windows 7 64 or 32
    3. The CNCA0 and CNCB0 will NOT appear under COM ports in device manager, but instead you will see a new "com0com - serial port emulators" category in device manager that lists 2 "com0com - serial port emulator" devices. If you see those, then CNCA0 and CNCB0 should work (and you should be able to use two instances of putty to test that)
    Again, on a brand new Windows 7 x64 machine, I found no issues using CNCA0 and CNCB0.

    ReplyDelete
  6. Hello. Is there a way to invoke the install without having to write "install - -" ? For example, is something like this possible:

    setupc --command="install - -"

    ? The installer installs without me having to enter anything, so I assume this is possible? Thank you for any help!

    ReplyDelete
  7. Hi Pete,

    I want to thank you and confirm here that this is also working on my Win7 64bit machine!
    It indeed gives the security warning but just accept and it will work.

    Thanks again!
    JeeCee

    ReplyDelete
  8. i can't install.. is it that i have uninstall the previous ports?

    ReplyDelete
    Replies
    1. What error are you getting? Did you try to follow the steps I posted 3 posts above?

      Delete
    2. I had to uninstall the previous ports for this to work, but then it worked without a hitch, so good job Pete, thanks a lot for this!!

      Delete
  9. I Quote from this website: http://www.tabletroms.com/forums/visual-land-tablets/5894-how-install-unsigned-drivers-windows-8-a.html
    just in case the site goes offline and you want to install com0com on windows 8.

    "so I found this post originally shared by drxman on slatedroid
    its a step by step guide on how to install unsigned drivers on windows 8.

    1.move your mouse corser to the upper right part on the screen
    then select settings ->change pc settings->choose General –> Under “Advanced Startup” –> Restart now.

    Now the system will restart and might take some minutes to show up the boot menu. Wait for It patiently.

    After some time you will be prompted with a menu with following options.

    1. Continue

    2. Troubleshoot

    3. Turn off

    Choose Troubleshoot

    Then the following menu appears.

    Refresh your PC
    Reset your PC
    Advanced Options

    Choose Advanced Options

    Then the following menu appears

    System Restore
    System Image Recovery
    Automatic Repair
    Command Prompt
    Windows Startup settings
    Choose Windows Startup Settings, then Click Restart.

    Now the computer will restart and the boot menu appears. Choose “Disable Driver signature Enforcement” from the menu. Now windows will start and you can do the installation of the driver that is not signed."

    ReplyDelete
    Replies
    1. Brilliant! Thanks, Roel.b. That's what I needed to get this working on my Surface Pro with Win8!

      Delete
  10. Note that I have now added a signed .cat file, which makes the installation of the com0com compatible with Windows 10. Otherwise, you would get "Error 0xe000022f: The third-party INF does not contain digital signature information".

    ReplyDelete
  11. Pete - I don't get the bit about not having to run the image to use the two ports. Which machine do you install com0com on if it's not a running VM? I must be missing something!

    ReplyDelete
  12. Hi Pete!
    As for me the best software tool to emulate and pair serial ports in VMware is Virtual Null Modem by Eltima. (http://www.eltima.com/products/virtual-null-modem/)
    If you will, check it. I'm really appreciate your opinion.

    ReplyDelete
    Replies
    1. Eltima are the people who made com0com. Except they decided to go commercial with their software. 14 day limit for the "free" version? $99 for the "full"? And "full" doesn't come with source code as standard (need to pay extra). As a Free Software developer, there's no way I can recommend that product, especially when com0com works just fine, is not trialware, and comes with the source (https://sourceforge.net/p/com0com/code/?source=navbar).

      Delete
  13. Pete, comOcom and Virtual Null Modem are developed by different companies. Virtual Null Modem has some advantages, like the possibility to create ports for the current user session only, and you also delete created ports in open terminal. I like its interface (more clear and obvious) and support team responds very fast.

    I used to work with comOcom app, but this details disappointed me.

    ReplyDelete
  14. Hi, Pete,
    I have a question..
    sorry My English speaking is bad... ^^;

    I need com0com driver(.sys, .inf, ...) for Windows 7, 8, 10 64bit system.

    Your signed com0com 2.2.2.0 driver is Good!!
    but I cannot use your signed driver. because I found ver 3.0.0.0.(ver 3.0.0.0 is last version.)
    I download com0com 3.0.0.0 from "https://sourceforge.net/projects/com0com/files/com0com/3.0.0.0/ "

    I have a "Symantec Code Signing Certificate". (sha2)
    So, I do next order..
    1. make com0com.cat by inf2cat.exe
    2. signing (com0com.sys, com0com.cat, setupc.exe, setupg.exe)

    I used command is,

    signtool.exe sign /v /f mydomain.pfx /p mypassword /fd sha256 /tr http://sha256timestamp.ws.symantec.com/sha256/timestamp /td sha256 com0com.sys <--- each 4 files name

    However, occurred (code 52) error on Device Manager.

    Did I misuse the code signing command?

    ReplyDelete
    Replies
    1. You can't sign Windows drivers with a regular code signing certificate. You must instead use an EV code signing certificate, which is A LOT more expensive (For instance see https://www.digicert.com/code-signing/ev-code-signing.htm and cry...)

      So what you're trying to do will simply not work.

      This is actually the reason I published the com0com signed drivers, because it's just way too expensive for regular people to sign them. Unfortunately, I no longer have a valid driver code signing certificate, so I can't sign new drivers.

      Now if you ever decide to go and purchase an EV certificate, please do the decent thing and sign and publish your signed drivers as I did, so that others can use them.

      Delete
  15. Hi,

    I installed the signed version for my Windows 10 pc. I can see the ports in the device manager under com0com. The problem is that I can't setup a communication with Putty.

    Any idea why?

    ReplyDelete
    Replies
    1. You need to type in the port in putty. In the "Serial line" field, you must type something like CNCA0 or CNCB0. If you use the default from putty, it will never work.

      Delete
    2. I can't get com0com0 (3.0.0.0 signed) working on my Win 10 notebook. Device Manager shows warning about certificates.

      I created some virtual com ports (COM8 and COM9). I can't open them with Putty. I can't open CNCA0 or CNCB0 either.

      How can I get this working on Win 10 ???

      Thanks, Brendan.

      Delete
  16. when installing I get:

    command> install - -
    CNCA2 PortName=-
    CNCB2 PortName=-

    Install not completed!
    command>

    ReplyDelete
  17. Thank you pete for this. Works with realterm on windows 10, except I had to rename the CNCA0 and CNCB0 ports to 'COM'-something before it would pick it up

    ReplyDelete
  18. Thanks pete and also I see on sourceforge that version 3 appears to have a signed version x64

    ReplyDelete
  19. In case anybody prefers the GUI setup version, there is a signed installer available at http://radio.jsh.de/com0com.zip

    ReplyDelete
  20. Amazing Pete! I was looking for a way to get Com0Com working on windows 10, cause you cannot go an make changes to your bios w/ corporate workstation this did it, Lifesaver!

    ReplyDelete
  21. Thanks, I checked the problem in Device Manager and it fixed it.

    ReplyDelete
  22. As ever wonderful stuff. Thank you.
    Now for a question or three. On Windows 10 x64 1909 the installer appears to work correctly.
    > install PortName=COM20 PortName=COM21
    > list
    CNCA0 PortName=COM20
    CNCB0 PortName=COM21
    but the new virtual ports do not show up in Device Manager and never appear when all COM ports are enumerated.
    What have I missed?

    ReplyDelete