Installer error "Obsidian cannot be closed" followed by "Failed to uninstall old application files: 2" (Windows 11) – what worked for me

While upgrading to Obsidian 1.14.4 on Windows 11, the installer failed in two steps:

  1. “Obsidian cannot be closed. Please close it manually and click Retry to continue.” Retrying did not help, even after closing the window.
  2. After that, “Failed to uninstall old application files. Please try running the installer again.: 2”

What worked for me:

  1. Cancel the installer.
  2. Kill every Obsidian process, including the background ones: taskkill /F /T /IM Obsidian.exe
  3. Delete the old program folder (%LOCALAPPDATA%\Programs\Obsidian, or the Program Files one if you installed system-wide). This only removes the app itself. Your vault and settings (%APPDATA%\obsidian) are separate.
  4. Remove the stale Obsidian entry under ...\CurrentVersion\Uninstall in the registry, if present.
  5. Run the installer again.

My guess is that a half-finished earlier install left the uninstall record and the actual files out of sync, so the installer couldn’t find the files it was trying to remove (error code 2 is “file not found”). I haven’t verified that, so corrections are welcome. If some files can’t be deleted because they’re locked, a reboot before step 5 should release them.