Windows 0x000000B7 error: file already exists fix
This pops up when something tries to create a file or folder that's already there. Usually from a botched install or a driver fighting itself.
You're trying to install a printer driver, update a piece of software, or maybe even run a system update, and then boom—Windows throws up ERROR_ALREADY_EXISTS (0x000000B7) with the message "Cannot create a file when that file already exists." It's not your file—it's something in the system that thinks it's already there.
Last month I had a client who couldn't install a new HP LaserJet driver. Every time the installer ran, it crashed with this error. Turned out an old scanner driver had left a stub entry in the registry. The new installer saw that stub and said "nope, already done" and bailed. Classic.
Root cause: the system thinks it's done
This error means something is trying to create a file, registry key, or named pipe that already exists. It's common in:
- Driver installs (especially printers and network adapters) where previous installs left orphaned entries.
- Software updates where the updater expects a clean folder but finds leftover junk.
- Windows Update if a previous update left a half-deleted component.
- Services or scheduled tasks that register a named pipe or event handle.
The fix is always the same: find what's blocking and remove it. No magic, just hunting.
Step-by-step fix for 0x000000B7
- Check which file or key is the problem. Look at the error's details. Often the installer log shows the exact path. If you don't have a log, move to step 2.
- Run Process Monitor (procmon) from Sysinternals. Filter by the process name that's failing and look for
CreateFileorCreateKeyoperations with statusALREADY EXISTS. This pinpoints the exact file or registry key. - Delete the offending item. If it's a file, take ownership if needed:
thentakeown /f C:\path\to\file /r /d y
then delete it. If it's a registry key, open Regedit, navigate to the key, and delete it. Back up the key first—right-click, Export.icacls C:\path\to\file /grant administrators:F /t - Remove orphaned printer drivers if this involves printing. Go to Print Management (run
printmanagement.msc). Look under Print Servers > Drivers. Right-click any driver you don't need and delete. If it won't delete, use
wherepnputil /delete-driver oemXX.infoemXX.infis the driver's filename. Find it with
.pnputil /enum-drivers - If the error comes from a Windows Update, stop the update service, clear the cache:
net stop wuauserv
net stop bits
ren C:\Windows\SoftwareDistribution SoftwareDistribution.old
net start bits
net start wuauserv - Run SFC and DISM to fix corrupted system files that might cause duplicate entries:
thensfc /scannowdism /online /cleanup-image /restorehealth - Reboot and try the original operation again.
What to check if it still fails
If you're still stuck, check these:
- Look for duplicate services. Run
services.mscand sort by name. If you see two entries with the same name but one is marked "Stopped" and the other "Running," the stopped one is a leftover. Check its properties—if it points to a missing file, delete the service with
.sc delete ServiceName - Check for leftover scheduled tasks. Run
taskschd.mscand look under Task Scheduler Library. Look for tasks related to the software or driver. Delete any that reference missing files. - Third-party security software. I've seen antivirus and firewall tools create dummy files or registry keys to block installations. Temporarily disable them (uninstall is better) and try again.
- Check the %TEMP% folder. Some installers create temp files with the same name. Clear it:
then retry.del %TEMP%\* /q /s
This error is stubborn but it's not a corrupt Windows—it's just a file or key in the way. Hunt it down, remove it, and you're done. If you hit a wall, post the exact path from Process Monitor, and I'll help you trace it.
Was this solution helpful?