Windows Cannot Open This File Unknown Extension

Fix Windows Cannot Open This File Unknown Extension Error

Windows Errors Beginner 👁 6 views 📅 Jun 17, 2026

Windows throws this when it has no clue what program opens a file. Usually a missing file association, sometimes a corrupt registry or bad .dll.

Quick Answer

Right-click the file, choose "Open with", select the right program, check "Always use this app", and you're done. If that fails, run the DISM and SFC commands, then reset file associations via Settings or the command line.

What's Actually Happening

This error pops up when Windows doesn't have a registered program for the file's extension. You double-click a .xyz file — Windows goes "I have no idea what that is." It's not a corrupt file (usually), it's a missing mapping. Happens all the time with niche file types: .psd (Photoshop), .ai (Illustrator), .dwg (AutoCAD), or even .json files if you don't have a text editor installed. I had a client last month whose entire print queue died because a .prn file wasn't associated — took me 10 seconds to fix.

Step-by-Step Fix

1. Tell Windows What Program to Use

This works 90% of the time. Right-click the file → Open with → Choose another app. Pick the right program from the list. If it's not there, click "More apps" or "Look for another app on this PC" to browse for the executable. Check the box "Always use this app to open .xyz files" — that registers the association permanently.

2. Run the Built-in Troubleshooter

Windows 10 and 11 have a dedicated fix. Go to Settings → Update & Security → Troubleshoot → Additional troubleshooters → Program Compatibility Troubleshooter. Run it — it sometimes catches bad file associations and resets them. It's not a magic bullet, but worth a shot.

3. Reset All File Associations (Nuclear Option)

If the error keeps popping up for multiple file types, your association database is toast. Here's the command to reset it:

cmd /c assoc
cmd /c ftype

But the real reset is this: Open an admin Command Prompt and run:

sfc /scannow
DISM /Online /Cleanup-Image /RestoreHealth

Then reboot. That fixes most corrupt system files that mess with associations. If it's still broken, use the Settings app: Settings → Apps → Default apps → Reset all default apps.

4. Registry Fix (Advanced Only)

If you're comfortable editing the registry — and only if — open Regedit and navigate to HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts. Find the extension folder (e.g., .xyz). Delete the UserChoice subkey. That forces Windows to rebuild the association from scratch. Back up the key first.

Alternative Fixes If the Main One Fails

1. Use a Third-Party Tool

I hate recommending extra software, but FileTypesMan (from NirSoft) is a lifesaver. It shows every registered extension and lets you edit associations directly. No install needed — just a portable .exe. Download it, find your extension, double-click to set the default program path.

2. Reinstall or Update the Program

Sometimes the program that should open the file is installed but its registration is broken. Uninstall and reinstall the app (e.g., Adobe Reader for .pdf, VLC for .mp4, Notepad++ for .txt). That re-registers the file type.

3. Check for Malware

Rare, but I've seen malware hijack file associations. Run a full scan with Windows Defender or Malwarebytes. If you see weird extensions like .xyz file opening in Notepad when it shouldn't, suspect infection.

4. Manually Rename the Extension

If you know the file type (e.g., a .docx file that got saved as .docx.doc), just rename the file with the correct extension. But be careful — don't change extensions on unknown files; you might lose data.

Prevention Tips

  • Install the right software before you need it. If you regularly get .psd files, install Photoshop or GIMP first.
  • Never double-click an unknown extension from email attachments — that's how ransomware spreads. Always scan first.
  • Use file viewer utilities like File Viewer Plus or Universal Viewer for one-off unknown files.
  • Keep Windows updated. I've seen updates break and then fix file associations in the same month.
  • Back up your registry occasionally. It's a 30-second task that saves you hours.

Bottom line: this error is almost always a simple mapping problem. Don't panic. Right-click, pick the app, move on. If it's systemic, the DISM/SFC combo cleans it up 99% of the time.

Was this solution helpful?