OBS "Error opening file for writing": how to fix it

"Error opening file for writing" is usually an installer message: the OBS Windows installer or updater could not overwrite a file, most often because OBS or a captured game still has it open, or security software blocked the write. Close everything that uses OBS, click Retry or reboot, then run the installer again. If your recording is what fails to save, check the Recording Path instead.

Applies to:OBS Studio installer and updater (Windows)Reports reviewed are from OBS Classic (2014) and OBS 20.1.3 (2017). Current releases were not checked, so these steps are unverified for them.OBS Studio recording path errorWindows and Linux forum report; not verified against current releases
On this page

What it means

That exact wording is a stock message from NSIS, the installer framework the OBS Windows installer and updater use. It means the installer tried to extract a file, could not open the existing copy to overwrite it, and is asking you to Abort, Retry or Ignore. The file named in the dialog varies. Forum reports mention GraphicsCaptureHook.dll and %TEMP%\OBS\check_for_64bit_visual_studio_2013_runtimes.exe.

Many people who search this phrase have a different problem: OBS cannot write the recording itself. That one appears as "The configured Recording Path could not be opened. Please check your Recording Path under Settings → Output → Recording" or "An unspecified error occurred while recording". The last fix below covers it.

Be aware of how much is known here. I could not find an official OBS support page for either message, and the forum threads behind this article date from 2014 and 2017. I did not confirm that current OBS installers behave the same way. Treat the steps as sensible, low-risk things to try, not a documented procedure.

Symptoms and causes

You are likely dealing with this problem if:

  • A dialog reading "Error opening file for writing" followed by a file path, with Abort, Retry and Ignore buttons, while installing or updating OBS.
  • In one reported case on OBS 20.1.3, the same error came back every time OBS started.
  • When recording: a start-recording error about the Recording Path, or a recording file that never appears.

The usual causes, most common first:

The target file is in use (installer)
If OBS, or a game or app OBS was capturing, still has the file open, the installer cannot replace it. The 2014 report names a plugin DLL, which fits this. OBS staff advice in the threads was to close OBS and captured apps, restart, and run the installer again.
Security software blocking the write (installer)
Staff in both forum threads suggested disabling security software during installation. Neither thread confirmed that this was the final fix, so treat it as a possibility.
Recording path missing, unwritable, full or unreachable
OBS cannot create the file in the folder set under Settings → Output → Recording. In one forum thread a user still got the Recording Path error after moving output to a disk with 350 GB free and opening folder permissions, and that thread had no confirmed resolution.

How to fix it

Work through these in order. They start with the quickest, safest checks and move to deeper repairs; stop as soon as the problem is gone.

1.Close OBS and captured apps, then click Retry

Easy

A file that is still open cannot be overwritten, and this was the first thing OBS staff advised.

  1. Close OBS and any game or program you were capturing.
  2. Press CtrlShiftEsc to open Task Manager and end any leftover OBS process, such as obs64.exe.
  3. Go back to the installer dialog and click Retry.

2.Restart the PC and run the installer as administrator

Easy

A restart releases locks that Task Manager may not show. This was also the advice of an OBS admin in the forum.

  1. Click Abort if the dialog is still open, then restart Windows.
  2. Before opening anything else, right-click the OBS installer and choose Run as administrator.

3.Test with third-party security software paused

ModerateChanges settings

OBS staff suggested this in two threads, though neither thread confirmed it fixed the problem.

Before you start: Only do this with a third-party security product, and only for the length of the install. Turn it back on right afterwards. Windows Security can stay on.

  1. Pause the third-party antivirus or security suite using its own tray icon or settings.
  2. Run the OBS installer again.
  3. Turn the security software back on, then add an exclusion for the OBS install folder if it blocks OBS again.

4.If it is the recording that fails: check the Recording Path

Easy

The Recording Path error means OBS cannot create the video file where you told it to.

  1. In OBS open Settings, then Output, then the Recording section, and copy the Recording Path.
  2. Paste it into the File Explorer address bar. Confirm the folder exists, the drive is connected and there is free space.
  3. Set the path to a plain local folder, such as a new one on C:, and try recording. If that works, the original location has a permissions problem.
  4. Check that your Windows account has write permission on the original folder, and check whether an antivirus folder-protection feature such as controlled folder access is blocking OBS.

Check that it worked

  • The installer finishes without the Abort/Retry/Ignore dialog, and OBS starts normally without the error.
  • A test recording of a few seconds starts and a video file appears in the Recording Path folder.

If it still fails

  • Note the exact file name in the error dialog and search the OBS Project forum for it, since the named file points to what is locking or blocking it.
  • Post on the OBS Project forum with your OBS version, Windows version and the full error text.

Sources

  1. Error: OBS 20.1.3 Error opening file for writing · OBS Project forum
  2. Installation Error – Error opening file for writing · OBS Project forum
  3. obs studio cannot write to filesystem it has as far as i can tell all permissions to · OBS Project forum
  4. NSIS Chapter 4: Installer Attributes/Instructions · NSIS documentation (SourceForge)