Fix OneDrive Crashing or Closing Immediately on Windows
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.

- 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 proceeding, ensure you have administrative privileges on your Windows account and temporarily pause any third-party antivirus software to rule out basic security interference.
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.
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.
Under the 'User variables' section, select 'Path' and click 'Edit'. Look for any entries related to PowerToys.
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.

Repair Microsoft Edge WebView2 and Test a New User Profile
A corrupted Edge WebView2 runtime or a damaged user profile can prevent the OneDrive login screen from rendering properly.
Run System File Checker (SFC) and Perform a Clean Reinstall
Resolve underlying Windows corruption, such as ucrtbase.dll errors, by running system file checks before cleanly reinstalling OneDrive.
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. Download WPS Office: Visit the official WPS website and download the free installation package for Windows.
- 2. Install and Launch: Run the installer. The lightweight design ensures it installs in seconds without relying on complex background runtimes.
- 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.

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.




