Open Command Prompt with administrator rights, move into com0com’s install folder, then run the setup tool there. If the install fails, run it again from the same elevated window before you check the ports. Without admin rights, com0com may create no virtual COM ports or leave a damaged driver entry. This guide gives the setup commands, recovery steps, and checks that prove the ports exist.
What you’ll need
- The com0com installation package with the setup utility in its folder.
- An account that can approve driver installation.
- Administrator access to cmd.exe.
- Optional .bat or .cmd files for repeat checks.
- A target COM pair, such as two free port numbers your workflow expects.
How do you access Command Prompt?
Use cmd.exe from Start search, Win+R, or the Windows Power User menu. For com0com setup, open the administrator version when the install must write drivers or create ports; a regular Command Prompt can open, but it may fail on protected steps.
Open cmd.exe three ways
- Press Win+R, type cmd, and press Enter.
- Open Start, type Command Prompt, then choose Run as administrator when needed.
- Press Win+X to open the Power User menu, then pick Windows Terminal or Command Prompt; on modern Windows 11 builds, the menu often points to Terminal first.
Suppose the com0com package sits in C:\Tools\com0com. Open an elevated shell, change to that folder, and run the setup tool from there. The current directory matters because the installer and its support files are usually stored together.
Administrator vs regular cmd
For driver work, use an administrator launch. A standard shell can list folders and run many commands, but com0com setup often needs elevation to load or update the virtual serial driver and register the pair correctly.
How do you set up com0com from Command Prompt?
Change into the com0com folder, run the setup command that creates the port pair, and then confirm that the command completes without a driver error. The key step is the actual setupc syntax: create the pair first, then verify the pair exists before you move on to any app that depends on it.
Run the install command
- Open cmd.exe as administrator.
- Change to the com0com folder, for example: cd /d C:\Tools\com0com.
- Run a named-port install such as setupc install PortName=COM5 PortName=COM6.
- If your package uses the default naming scheme, install the pair first, then rename or map it to the COM numbers your workflow needs.
Use exact syntax, not guesses
The command line must match the pair you want. A named example such as PortName=COM5 PortName=COM6 tells com0com which virtual ports to create. If the command returns an error, rerun it from the same elevated shell before changing anything else.
A common first-time mistake is typing the command in the wrong folder, then assuming the driver failed. If setupc is not in the current path, the shell will not find it. Use dir to confirm the file is there before you run the install.
How do you verify the ports were created?
Use setupc list after installation and check that the pair exists with the COM numbers you intended. Verification matters because com0com can appear to install while still leaving no usable pair, especially after a blocked driver load or a port-number conflict.
Check the installed pair
- Stay in the elevated com0com folder.
- Run setupc list.
- Look for the pair you created, including both port names.
- Confirm the COM numbers match the software or device that will use them.
Save the output for later review
Use redirection if you need a log file: setupc list > com0com-list.txt. If you want to compare later runs, keep the same filename pattern. That gives you a simple record of whether the pair appeared after install or disappeared after a failed change.
| Setup symptom | Likely cause | Exact Command Prompt action to verify or fix it |
|---|---|---|
| No COM pair appears after install | The setup ran without elevation or the driver load was blocked | Open cmd.exe as administrator, go to the com0com folder, then run setupc list and setupc install PortName=COM5 PortName=COM6 again |
| Access denied during setup | UAC stopped the write step | Launch elevated cmd from Start search or Win+X, then rerun the same setupc install command |
| Device pair missing after reboot | The pair was never committed cleanly | Run setupc list; if missing, rerun setupc install PortName=COM5 PortName=COM6 |
| Driver load failure | Windows blocked the driver package | Open elevated cmd and rerun the install only after confirming the package is the signed build you intended to use |
| Port-number conflict | Another device already owns that COM number | Pick free numbers, then rerun setupc install PortName=COM11 PortName=COM12 or another unused pair |
| Wrong COM number assignment | The install created a different pair than your app expects | Run setupc list, note the actual numbers, then reinstall with the exact target names |
| Signature blocking on modern Windows | The driver package is not accepted on the current build | Verify from elevated cmd that the package folder contains the intended signed build before retrying the setup |
| Bad rollback after a failed install | Partial driver state remains | Use the setup tool’s removal command if present in your package, then rerun setupc install PortName=COM5 PortName=COM6 |
Can’t get to Command prompt—what do I do?
If normal cmd will not open, use boot-time access. Windows Setup can open Command Prompt with Shift+F10, and Advanced Startup can lead to a Command Prompt option after Repair your computer. That path matters when the desktop will not load or local policy blocks the shell.
Use the recovery path
- Go to Repair your computer from Windows Setup or recovery media.
- Choose Troubleshoot > Advanced options > Command Prompt when available.
- If you are at Windows Setup, press Shift+F10 to open Command Prompt directly.
- From there, switch to the com0com folder and rerun the install command.
Picture a machine that reaches setup media but not the desktop. In that case, Shift+F10 gives you a shell early enough to inspect files, copy logs, or rerun the install path before the normal Windows session is even available.
What commands do I need after installing com0com?
After installation, the two commands that matter most are the install command and the list command. Use the first to create the pair, and the second to verify that the pair exists with the right COM numbers. Put both into a .cmd file if you need repeatable checks.
Turn the steps into a batch file
- Create a text file named something like com0com-check.cmd.
- Add the folder change command and the setup commands you need.
- Save the file in the same folder as the setup utility, or call the full path.
- Run it from an elevated shell so each command inherits admin rights.
Use input redirection only if the script needs a saved command list, and use output redirection when you want a log. Pipe operators are useful when you chain Windows shell output into another command, but for com0com setup the plain setupc install and setupc list commands are usually clearer.
Common mistakes
Most com0com setup failures trace back to elevation, path, or port-number mistakes. Fix those first. If the driver still does not appear, verify the package you extracted contains the setup utility and that Windows did not block the driver before the pair creation step.
- Running setupc without elevation: open cmd.exe as administrator and rerun the same command.
- Using the wrong folder: change into the com0com install directory before typing anything else.
- Skipping verification: run setupc list after every install.
- Choosing busy COM numbers: pick unused port numbers and reinstall the pair.
- Mixing cmd.exe with PowerShell assumptions: if you use PowerShell, call cmd /c for the same command syntax.
Frequently asked questions
How do you get command prompt on PC?
Use Start search, Win+R, or the Power User menu from Win+X. On modern Windows 11 systems, the menu may open Windows Terminal first, but it can still launch cmd.exe. Pick the administrator option when you are changing drivers or system devices.
How do you get Command Prompt?
The fastest path is Win+R, then type cmd. If that fails, use Repair your computer from Windows Setup or Advanced Startup and open the Command Prompt option there. Boot media also lets you use Shift+F10 during setup.
How do you open Command Prompt as administrator?
Search for Command Prompt in Start, then choose Run as administrator. You can also use Win+X and pick the elevated shell if the menu offers it. That launch is the one to use for com0com driver installation and port creation.
How do you open Command Prompt at boot?
Start from Windows Setup or recovery media, then press Shift+F10 to open Command Prompt on setup screens. If you are already in recovery, choose Repair your computer first, then go to Troubleshoot > Advanced options > Command Prompt.