0X00001392

0x1392: The Object Already Exists Error Fix

Stop getting this error when creating files or registry keys. Three common causes with real fixes that actually work.

Cause 1: You're creating a registry key that already exists

This is the most common reason I see for 0x00001392. Someone writes a script or runs a tool that tries to create a registry key that's already there. Windows slaps you with the error because it can't overwrite a key that exists. This usually happens when you run a setup script twice, or a program tries to register itself after it's already installed.

What to expect: You'll see the error pop up in Event Viewer (source: Application, event ID usually 0) or as a direct dialog box. On Windows 10 and 11, it often appears when installing Visual Studio extensions or driver files.

The fix: Check and delete the existing key, or skip creation

  1. Press Win + R, type regedit, hit Enter. Click Yes if UAC asks.
  2. Back up your registry first. Go to File > Export, save a full backup. You'll thank me later.
  3. Press Ctrl + F to open Find. Type the name of the key you're trying to create (the error message should include it).
  4. Click Find Next. If found, you'll see it in the left pane. Right-click that key, select Delete, and confirm.
  5. Close regedit and try your script or install again. The error should be gone.

If you're writing a script, a better fix is to check if the key exists before creating it. PowerShell example:

if (-not (Test-Path 'HKLM:\Software\YourKey')) {
    New-Item -Path 'HKLM:\Software\YourKey'
}

That way, you never try to create a duplicate. The script just skips it if it's there.

Cause 2: A file or folder with that name already exists

Sometimes it's not the registry — it's the file system. This error pops up when you try to create a file or folder that already exists in that exact location. I've seen it most often when copying files from an encrypted drive or when a backup tool tries to write a log file that's still open.

Real-world trigger: You're using a disk cloning tool like Macrium Reflect or a sync tool like FreeFileSync, and it tries to create a destination folder that's already there. Or you're extracting a ZIP file and the target directory name collides with an existing one.

The fix: Delete or rename the duplicate file/folder

  1. Open File Explorer and go to the location shown in the error (or the folder you're writing to).
  2. Look for a file or folder with the exact same name as the one you're trying to create. If you see it, right-click and Delete it, or rename it by pressing F2 and typing a new name.
  3. If the file is locked by another program, close that program first. Use Process Explorer from Sysinternals if you can't figure out what's locking it.
  4. Try your operation again. Should work now.

Quick tip: If you're copying files and want to overwrite duplicates without this error, use the command line with the /E (copy directories and subdirectories, including empty ones) and /IS (same files are assumed to exist) flags in robocopy. Example:

robocopy C:\Source D:\Dest /E /IS

This tells Windows to overwrite existing files instead of throwing error 0x1392.

Cause 3: The object is a named pipe or kernel object already in use

This is the advanced case, but it happens. The error refers not to a file or registry key but to a named kernel object — like a named pipe, mutex, or event. If an application tries to create a named pipe that another process already opened, you get 0x1392. I've debugged this with custom C++ apps and also with SQL Server named pipes conflicts.

How to spot it: The error message might not mention a file path or registry key at all. You might see it in a developer tool or in the System event log. Process Monitor from Sysinternals can help you trace which object is colliding.

The fix: Identify and close the conflicting process

  1. Download and run Process Explorer from Microsoft's Sysinternals site. Run as Administrator.
  2. Press Ctrl + F to open the Find Handle or DLL window.
  3. Type a part of the object name (the error might show something like "\Device\NamedPipe\MyPipe").
  4. Look at the results. You'll see which process (PID) holds that object. Double-click it to jump to that process.
  5. Right-click the process and select Kill Process — only if it's safe to kill. If it's a system service, restart the service instead of killing the process.
  6. Alternatively, restart your computer to clear all named objects. That's the nuclear option but works every time.

Prevention: If you're writing code, use CreateFile with the OPEN_ALWAYS flag instead of CREATE_NEW. That way, if the object exists, it opens the existing one instead of failing.

Quick-reference summary table

Cause Symptom Quick Fix
Registry key exists Error during install or script that writes to registry Delete the key in Regedit or add a check in your script
File/folder exists Error when copying, extracting, or saving a file Delete or rename the existing file/folder; use robocopy with /IS
Named pipe/kernel object in use Error in developer tools or SQL Server; no file path shown Find the process with Process Explorer, kill it, or reboot

That's it. Three causes, three fixes. Start with the registry if you're running an installer. Try the file system if you're copying or saving. Go for the deep dive with Process Explorer if neither works. You got this.

Related Errors in Windows Errors
0XC00D1206 Fix NS_E_WMP_DRM_LICENSE_UNUSABLE (0XC00D1206) – Cracked DRM Rights 0XC000002A STATUS_NOT_LOCKED (0xC000002A) Fix: Unlocking Memory That Wasn't Locked 0X00000963 Fix 0X00000963 (NERR_BadPasswordCore): Share Name or Password Invalid 0XC000005D STATUS_CANT_DISABLE_MANDATORY 0xC000005D Fix

Was this solution helpful?

EP
Erropedia Team
Tech Support Editors
The Erropedia editorial team researches and documents real-world tech errors from across Windows, Linux, macOS, networking, databases, cloud platforms, and more. Every solution is reviewed for accuracy and updated as software and systems evolve.