Skip to content

Est. 2011ยทMicrosoft Partner ID 7033487ยทDelivery under 3 minยทSupport 7 days a week

Your vault is empty.

Free Fix 0xC1900107

0xC1900107 and 0xC190010A: leftover setup state, and setup command lines it will not accept

10 min read Updated October 5, 2026 Windows Update & Setup

Fix it now

These two codes look related and are not. 0xC1900107 is a cleanup operation from a previous installation attempt still pending, and Microsoft’s mitigation is a restart followed by Disk Cleanup. 0xC190010A is MOSETUP_E_UNKNOWN_CMD_LINE – setup was launched with an argument it does not recognise, which is a problem with your command line rather than with the machine.

Run cleanmgr first and choose Clean up system files; then the three commands, in an elevated Command Prompt

cleanmgr
net stop wuauserv
ren C:\Windows\SoftwareDistribution SoftwareDistribution.old
net start wuauserv
  1. Restart the machine and try the upgrade again before anything else. Microsoft’s published mitigation for 0xC1900107 starts here, and a genuinely pending file operation clears on the restart.
  2. Open Settings, Windows Update, install everything outstanding and restart until the device reports nothing pending.
  3. Run Disk Cleanup as administrator, choose Clean up system files, and tick Temporary Windows installation files and Previous Windows installation(s). This is the published second step and it removes setup’s working folders properly.
  4. If you are launching setup from a script or a deployment tool, run setup.exe by hand from the same media first. If that works, the fault is in the command line and nothing on the machine needs fixing.
  5. Check every switch against Microsoft’s published option list, and quote any path containing spaces. Watch for smart quotes pasted out of a document or a ticket.
  6. If 0xC1900216 is what you have, a pending operating system rollback is on the machine. Let it complete or resolve it before starting a new upgrade.

/EULA accept is required when you pass /Quiet. A quiet run without it is one of the easier ways to produce a command line setup rejects.

If setup gets past its initial checks into the download or copy stage, you are through this. If not, the next section covers what counts as pending and which switches setup actually takes.

Why it happens

Windows will not begin a feature update on top of another servicing operation that has not finished. 0xC1900107 is that refusal: Microsoft publishes it as a cleanup operation from a previous installation attempt still pending, with a system restart required to continue. The published mitigation is to restart the device and run setup again, and if that does not resolve it, use Disk Cleanup on the temporary files and the system files. That is the whole documented remedy, and it is deliberately conservative.

0xC1900216 is the most informative code in this set and used to be described here as a generic pre-installation check. It is MOSETUP_E_ROLLBACK_PENDING: ‘Found pending OS rollback operation.’ That is a specific and actionable statement – the machine is part way through undoing a previous upgrade, and starting a new one on top of that is not going to work.

0xC190010A and 0xC190010D come from the same executable and say nothing about the state of the machine. 0xC190010A is MOSETUP_E_UNKNOWN_CMD_LINE, the installation process was launched with an unknown command-line argument. 0xC190010D is MOSETUP_E_INVALID_CMD_LINE, launched with an invalid one. The distinction is between a switch setup has never heard of and a switch it knows with a value it will not take. Either way, the machine is fine and the script is not.

0x80070BC2 is Win32 3010, ERROR_SUCCESS_REBOOT_REQUIRED: ‘The requested operation is successful. Changes will not be effective until the system is rebooted.’ It is a success code. Where it turns up in this story it is usually the thing that created the pending state – an installer finished, asked for a restart, and never got one.

A restart is genuinely outstanding

You have this one if The error appears immediately, before any progress, and the machine has installed updates or drivers recently without being restarted.

  1. Restart. If updates install during shutdown, let them finish and restart a second time.
  2. Open Settings, Windows Update and install anything still listed, repeating until it reports the device is up to date with no restart required.
  3. Try the upgrade again before doing anything more invasive.

A pending flag survives every restart

You have this one if You have restarted several times and setup still reports 0xC1900107 the moment it starts.

  1. Run Disk Cleanup as administrator with Clean up system files, and remove temporary Windows installation files and previous Windows installations. This is Microsoft’s published second step.
  2. Check for a servicing flag: a RebootPending key under HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing.
  3. Check for queued file moves in PendingFileRenameOperations under HKLM\SYSTEM\CurrentControlSet\Control\Session Manager.
  4. Run Dism.exe /online /Cleanup-Image /StartComponentCleanup and restart, which lets a stuck servicing operation finish tidying.

Clearing PendingFileRenameOperations discards work Windows intended to do. It is defensible when the entries belong to a product you have already removed, and a bad idea when they belong to a half-installed Windows update.

A pending operating system rollback

You have this one if 0xC1900216, on a machine where a previous upgrade rolled back or was interrupted.

  1. Let the rollback complete. Restart and allow the machine as long as it needs before intervening.
  2. Once it has settled, install outstanding updates and restart again so nothing else is pending.
  3. Use Disk Cleanup to remove the previous Windows installation, which is what the rollback was holding on to.
  4. Start the new upgrade only after winver shows the build you expect and nothing reports a pending restart.

The command line is not one setup accepts

You have this one if 0xC190010A or 0xC190010D, and the upgrade only fails when launched from a script, task sequence or management tool.

  1. Run setup.exe manually from the same media. Success there confines the fault to the command line.
  2. Check each switch against the published list and its accepted values, rather than against memory or an old deployment script.
  3. Add /EULA accept if you are passing /Quiet; it is documented as required in that case.
  4. Quote paths with spaces and retype any switch that has been through a word processor.

Something keeps re-arming the pending state

You have this one if The flags come back within minutes of every restart, on a managed machine.

  1. Check whether a management agent is mid-deployment and let it finish, or pause its maintenance window while you upgrade.
  2. Look for an installer that returned 0x80070BC2 and was never followed by the restart it asked for, and give it one.
  3. Run the upgrade inside a window when nothing else is scheduled to install.

Full reference

The five codes side by side

Code Published meaning
0xC1900107 MOSETUP_E_CLEANUP_PENDING: a cleanup operation from a previous installation attempt is still pending; a restart is required
0xC190010A MOSETUP_E_UNKNOWN_CMD_LINE: launched with an unknown command-line argument
0xC190010D MOSETUP_E_INVALID_CMD_LINE: launched with an invalid command-line argument
0xC1900216 MOSETUP_E_ROLLBACK_PENDING: found pending OS rollback operation
0x80070BC2 Win32 3010, ERROR_SUCCESS_REBOOT_REQUIRED: successful, but changes need a restart

The setup options Microsoft publishes

Option Accepted values Notes
/Auto Clean, DataOnly, Upgrade Upgrade keeps apps and data
/Compat IgnoreWarning, ScanOnly ScanOnly runs the scans and exits
/DynamicUpdate Enable, Disable, NoDrivers, NoLCU, NoDriversNoLCU Controls what setup fetches mid-run
/MigrateDrivers All, None Whether existing drivers come across
/ShowOOBE Full, None None skips OOBE and takes defaults
/Priority Normal, Low Low runs setup at low thread priority
/NoReboot – Suppresses only the first restart after the down-level phase
/Quiet – Suppresses the setup experience, including the rollback experience
/EULA accept Required when /Quiet is used
/CopyLogs A local or UNC path Collects logs from an unattended run
/PKey A product key Supplies a key to setup

Checking for a pending restart without editing anything

  • Settings, Windows Update states plainly whether a restart is required.
  • Component Based Servicing carrying a RebootPending key means servicing is waiting on one.
  • PendingFileRenameOperations under Session Manager lists file moves queued for the next restart.
  • An installer that returned 0x80070BC2 has told you the same thing in its own log.
  • Reading all four is quicker than deleting any of them, and tells you whether the pending state is real work or a leftover.

If you must remove setup’s folders by hand

  1. Use Disk Cleanup with Clean up system files first. It removes $Windows.~BT and $Windows.~WS without permission problems and is what Microsoft publishes.
  2. Copy out any logs you still need; they are the only thing of value in those folders.
  3. Only if a folder refuses to delete, take ownership with takeown /f C:\$Windows.~BT /r /d y and grant access with icacls C:\$Windows.~BT /grant administrators:F /t.
  4. Then remove it with rd /s /q C:\$Windows.~BT.
  5. Restart before starting the upgrade so setup creates its folders fresh.

When the upgrade only fails through your deployment tool

Start by proving the media and the machine are fine with a manual run, then compare the two command lines character by character. The accepted switch set changes between builds, so a line that has worked for years can be rejected outright by a newer setup.exe – which is exactly what MOSETUP_E_UNKNOWN_CMD_LINE says. Deployment tools also expand variables into paths with spaces, so a quoting problem that never showed up in testing appears the first time a machine has a different install path.

Every code this article covers

Code What it points at Source
0xC1900107 MOSETUP_E_CLEANUP_PENDING: a cleanup operation from a previous installation attempt is still pending and a restart is required to continue Microsoft Learn
0xC190010A MOSETUP_E_UNKNOWN_CMD_LINE: the installation process was launched with an unknown command-line argument Microsoft Learn
0xC190010D MOSETUP_E_INVALID_CMD_LINE: the installation process was launched with an invalid command-line argument Microsoft Learn
0xC1900216 MOSETUP_E_ROLLBACK_PENDING: found pending OS rollback operation Microsoft Learn
0x80070BC2 Win32 3010, ERROR_SUCCESS_REBOOT_REQUIRED: the operation succeeded but changes take effect only after a restart Microsoft Learn

Confirm the fix worked

  1. A restart no longer brings any of the pending markers back.
  2. Settings, Windows Update reports the device up to date with no restart required.
  3. C:\$Windows.~BT and C:\$Windows.~WS are gone before the next attempt begins.
  4. Setup gets past its initial checks into the download or copy stage rather than failing immediately.
  5. After the upgrade, winver shows the new build and Disk Cleanup offers a previous Windows installation to remove.

Questions people ask about this

Does anything here need to be bought?

No. Every step is a restart, a built-in cleanup tool or a correction to a command line.

Is it safe to delete C:\$Windows.~BT by hand?

It is setup’s scratch space rather than part of Windows, so nothing but the logs from the failed attempt is lost. Microsoft’s published route is Disk Cleanup with Clean up system files, which handles ownership and permissions properly; hand deletion is the fallback when a folder refuses to go.

The error only appears through our deployment tool. Where do I start?

Run setup.exe by hand from the same media. If that works, the machine is fine and the command line is the fault – which is exactly what 0xC190010A means.

What is 0xC1900216 telling me?

That the machine has a pending operating system rollback. Let that finish before you start anything new; a fresh upgrade layered on an incomplete rollback is not a supported state.

How do I check for a pending restart without touching the registry?

Settings, Windows Update says so directly, and an installer that returned 0x80070BC2 has already told you. The registry keys are useful when you need to know which subsystem is waiting, not to find out whether something is.

Related error codes

Was this article helpful?

Your feedback helps us improve our documentation.

Related articles

Free Fix 0x80070643 on KB5034441: the recovery partition is too small to patch License Error 0x800F0906 in DISM: Windows cannot download the repair source files Free Fix 0x80244017 and 0x80244024: WSUS rejects the client with 401 or 505 License Error 0x800B0100 and 0x800B0109: update signature and certificate failures
โ† Back to Knowledge Base