You switch on your laptop, and before the desktop even settles, a grey box pops up: "OneDrive.exe - Bad Image". It names a DLL you've never heard of, says it "is either not designed to run on Windows or it contains an error", and ends with a cryptic code like 0xc000012f. You click OK, it comes back. OneDrive's cloud icon never appears, and your files stop syncing.
This is one of the more common OneDrive tickets on an IT service desk, and the good news is that it's almost never a sign of a virus or a dying laptop. In most cases one of OneDrive's own program files got damaged, usually during an update. This guide walks through the fixes in the order that solves it fastest, without losing a single file.
What the error looks like
The title bar usually shows OneDrive.exe - Bad Image. On some PCs it names a OneDrive helper instead, such as FileCoAuth.exe, FileSyncHelper.exe or the OneDrive sync or updater service. The message reads something like:
C:\Users\YourName\AppData\Local\Microsoft\OneDrive\26.xxx.xxxx.xxxx\WebView2Loader.dll
is either not designed to run on Windows or it contains an error.
Try installing the program again using the original installation media
or contact your system administrator or the software vendor for support.
Error status 0xc000012f.
The DLL varies: WebView2Loader.dll, FileSyncShell64.dll, LoggingPlatform.dll, ucrtbase.dll and msvcp140.dll are the ones seen most often. The status code is usually 0xc000012f (the file isn't a valid program file) or sometimes 0xc0000020.
Why it happens
- An interrupted OneDrive update. OneDrive updates itself silently in the background. If the PC shuts down, sleeps or loses power mid-update, a half-written DLL is left behind. This is the most common cause by far.
- Antivirus interference. A security tool quarantined or locked a OneDrive file while it was being updated.
- Two OneDrive installs fighting. A per-user install (in AppData) and a per-machine install (in Program Files) on the same PC can clash after updates.
- Damaged Windows files or disk errors. Less common, but worth checking if other apps also show "Bad Image".
Fix 1: Re-run OneDrive setup from its version folder (2 minutes)
- Press Win + R, paste
%localappdata%\Microsoft\OneDriveand press Enter. - Open the folder with the newest version number (for example
26.012.0199.0002). - Double-click OneDriveSetup.exe and let it finish.
- Restart the PC, then open OneDrive from the Start menu.
If the folder path in your error message points to C:\Program Files\Microsoft OneDrive instead, you have the per-machine version. Skip to Fix 3.
Fix 2: Reset OneDrive
A reset clears OneDrive's settings and cache and rebuilds its connection. It doesn't delete your files.
- Press Win + R and run:
%localappdata%\Microsoft\OneDrive\onedrive.exe /reset - If you see "Windows cannot find...", try:
C:\Program Files\Microsoft OneDrive\onedrive.exe /reset - Wait a minute or two, then start OneDrive from the Start menu if it doesn't open on its own.
A reset fixes sync problems, but if the DLL itself is damaged it may not be enough. If the Bad Image box returns, go to Fix 3.
Fix 3: Uninstall and reinstall OneDrive (the fix that almost always works)
- Right-click the OneDrive icon (if it's there) and choose Pause syncing, then Quit OneDrive.
- Open Settings > Apps > Installed apps, find Microsoft OneDrive, and click Uninstall.
- Restart the PC.
- Open
%localappdata%\Microsoft\OneDriveagain. If old version folders are still there, delete just those version-numbered folders. Don't touch your actual OneDrive files folder (usuallyC:\Users\YourName\OneDrive). - Download the latest OneDrive from Microsoft's official download page (microsoft.com/microsoft-365/onedrive/download) and install it.
- Sign in. OneDrive will scan your existing folder, match it with the cloud and resume syncing, without downloading everything again.
If the installer says "a newer version is already installed", the uninstall didn't fully finish. Restart again and repeat step 4, or reinstall it with winget from Terminal:
winget uninstall Microsoft.OneDrive
winget install Microsoft.OneDrive
Fix 4: Check your antivirus quarantine
Open your antivirus (or Windows Security > Virus & threat protection > Protection history) and look for anything related to OneDrive around the time the error started. If a genuine Microsoft OneDrive file was quarantined, restore it, or simply reinstall OneDrive after updating the antivirus. Never disable your antivirus permanently to make the error go away.
Fix 5: Repair Windows system files
If the DLL in the message is a Windows or Visual C++ file, such as ucrtbase.dll, msvcp140.dll or vcruntime140.dll, or other programs also show "Bad Image", repair Windows itself. Open Terminal (Admin) and run these one at a time:
DISM /Online /Cleanup-Image /RestoreHealth
sfc /scannow
chkdsk C: /scan
Then install the latest Microsoft Visual C++ Redistributable (x64 and x86) from Microsoft's site and restart. Finally, run Windows Update and install everything pending, including optional quality updates.
For IT admins: fixing it across many PCs
- When several users report it after the same OneDrive build rolled out, it's usually the update ring, not the users. Check the OneDrive release notes and Microsoft 365 admin center Service health.
- Standardize on one install type. The per-machine install (
OneDriveSetup.exe /allusers) is easier to manage on shared and VDI machines, and avoids per-user copies getting out of step. - With Intune, a remediation script can detect a broken OneDrive version folder and re-run setup silently. Deploying the latest installer as a Win32 app is a reliable way to repair it for affected users.
- Exclude OneDrive's program folders from third-party antivirus "aggressive" scanning only if your security team approves, and only for the program folder, never for the user's synced files.
Managing devices with Intune? Our guide on PowerShell scripts that automate everyday IT tasks is a good starting point for remediation scripts.
Is it a virus?
Almost never. The path in the message points to Microsoft's own OneDrive folder, and the cause is a damaged file, not malware. That said, if the path points somewhere unusual (a Temp folder, a random folder name, or a file called OneDrive.exe outside the normal locations), run a full scan with Microsoft Defender. If you think your device might be compromised, see our checklist on signs of a hacked device and what to do.
FAQ
Will uninstalling OneDrive delete my files?
No. Uninstalling removes the app, not your OneDrive folder or anything in the cloud. When you reinstall and sign in, OneDrive reconnects to the same folder. Files-On-Demand placeholders may need to download again when you open them.
Can I just click OK and ignore it?
You can, but OneDrive won't run, so nothing syncs or backs up. New files you save to the OneDrive folder stay only on your PC until it's fixed.
What does error status 0xc000012f mean?
It means Windows tried to load a program file (usually a DLL) and found it isn't a valid executable image, typically because it's corrupted or incomplete. Replacing the file by reinstalling the app fixes it.
The error came back after a few days. Why?
The next background update may have been interrupted again. Make sure the PC isn't being force-shut down during updates, check antivirus logs, and run the Windows repair commands in Fix 5. If it keeps happening on a work PC, ask IT to check the OneDrive deployment and update policy.

0 Comments