logo
search
Others

Fix OneDrive Crashing or Closing Immediately on Windows

Emma BrownEmma Brown Sep 29, 2026 868 views

Question details

The user needs a solution to resolve the issue of OneDrive crashing during startup or closing instantly when attempting to add an account.

How to Fix OneDrive Crashing or Closing Immediately on Windows
Product
OneDrive
Device & OS
Windows
Scenario
Launching the OneDrive desktop application or selecting the 'Add an account' option, especially after a fresh installation or Windows upgrade.
Observed behavior
OneDrive abruptly crashes or closes immediately, sometimes generating a ucrtbase.dll error in the Event Viewer, even after standard resetting or reinstalling attempts.
Before you start

Before proceeding, ensure you have administrative privileges on your Windows account and temporarily pause any third-party antivirus software to rule out basic security interference.

Solution 1Recommended

Check and Remove PowerToys from PATH Environment Variables

Conflicts with Microsoft PowerToys modifying the user PATH variables are a known cause of OneDrive startup crashes.

If you recently installed PowerToys, it may have altered system environment variables that conflict with OneDrive's launch sequence. Removing it from the PATH temporarily can isolate the issue.

1
Open Environment Variables

Press the Windows key, type 'Environment Variables', and select 'Edit the system environment variables'. Click the 'Environment Variables' button at the bottom of the window.

2
Edit User PATH

Under the 'User variables' section, select 'Path' and click 'Edit'. Look for any entries related to PowerToys.

3
Remove PowerToys Entry

Select the PowerToys entry, click 'Delete', and then click 'OK' on all windows to apply the changes. Restart your computer and try launching OneDrive again.

Check and Remove PowerToys from PATH Environment Variables
Successful Troubleshooting: If OneDrive launches successfully after this step, you can try updating PowerToys to the latest version to see if the bug has been patched.
Free Microsoft Office alternative

Try WPS Office for Seamless Document Management

If OneDrive and Microsoft Office issues continue to disrupt your workflow, consider switching to WPS Office. It is a lightweight, free alternative that offers built-in cloud synchronization, avoiding complex Windows component conflicts while providing excellent compatibility with all Microsoft formats.

  1. 1. Download WPS Office: Visit the official WPS website and download the free installation package for Windows.
  2. 2. Install and Launch: Run the installer. The lightweight design ensures it installs in seconds without relying on complex background runtimes.
  3. 3. Sync with WPS Cloud: Sign in to activate your free WPS Cloud storage, enabling you to auto-save and sync documents effortlessly across your devices.
Highly compatible with Microsoft Word, Excel, and PowerPoint file formatsBuilt-in WPS Cloud for reliable file backup and syncing without Windows PATH conflictsLightweight design that minimizes system resource usage and crashesFree to download and use with a familiar, easy-to-navigate interface
microsoft office alternative - wps office

Frequently Asked Questions

Why is OneDrive crashing with a ucrtbase.dll error?

This error code (often 0xc0000409) indicates a fault in the Universal C Runtime library within Windows. It is typically caused by system file corruption, conflicting updates, or background software conflicts. Running the 'sfc /scannow' command in an elevated Command Prompt can often repair these underlying library files.

Will completely reinstalling OneDrive delete my locally saved files?

No, uninstalling or reinstalling the OneDrive desktop application does not delete your local files or the data stored securely in your cloud account. After you reinstall and sign back in, OneDrive will simply resync with the existing folders.

How do I check if my antivirus is causing OneDrive to close immediately?

You can verify this by temporarily disabling your third-party antivirus software or pausing Windows Defender real-time protection via the Windows Security app. If OneDrive opens successfully afterward, you should add 'OneDrive.exe' to your antivirus software's exception or whitelist settings.