Cannot open json files in default app

I set my default app for json files to be vscode. It works in File Explorer. However, in DO, it keeps opening json files in notepad++.

Try using right-click > Open With and then change the default app from there.

Make sure you're on the latest version as well, as Windows 11 made some changes recently that meant we had to make changes to Opus for this to work properly.

I already did the "open with". I'm on 13.16 (current version). One observation is that the file icon changed to the vscode version even in DO.

Please do this:

  • Settings > File Types
  • Click the menu at the top right, and choose Diagnostic
  • Enter json (or the file extension in question) and push OK.

It should create a zip file on your desktop with details of the file types / registry settings.

Please send us the zip via reply, private message, or email to crashdumps@gpsoft.com.au

OK, I sent a DM with the diagnostic. Thank you.

In your registry, .json's UserChoiceLatest is json_auto_file which points to notepad++.

Not sure why File Explorer isn't respecting that as well. Maybe the hash is wrong, so it's ignoring it, while we have no way to verify the hash as it's part of Microsoft's intentional obfuscation.

I'm also surprised if Open With > Choose Default App isn't changing UserChoiceLatest, on a system that has UserChoiceLatest at all. (This is all part of Microsoft's latest layer of undocumented changes to try and stop other software changing default applications like they do in their own apps. It's all very annoying. Some of the details may not yet be understood, and also seem to be changing as they test this new idea.)

HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.json\UserChoiceLatest\
HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.json\UserChoiceLatest: "Hash" is REG_SZ: "8PRmd9RkHAw="
HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.json\UserChoiceLatest\ProgId\
HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.json\UserChoiceLatest\ProgId: "ProgId" is REG_SZ: "json_auto_file"

HKCR\json_auto_file\
HKCR\json_auto_file\shell\
HKCR\json_auto_file\shell\open\
HKCR\json_auto_file\shell\open\command\
HKCR\json_auto_file\shell\open\command: "" is REG_SZ: ""C:\Program Files\Notepad++\notepad++.exe" "%1""

If regedit will allow you to delete this UserChoiceLatest registry key, things should work again:

  • HKEY_CURRENT_USER
    • Software
      • Microsoft
        • Windows
          • CurrentVersion
            • Explorer
              • FileExts
                • .json
                  • UserChoiceLatest

It may block you from deleting it, in which case the easiest workaround is to make an Opus-specific override. See Directory Opus opens PDF Files in Microsoft Edge instead of default PDF viewer - #24 by Leo for how to do that, as it's basically the same problem but with PDF instead of JSON.

So far only a few people have run into this problem, so it's probably something to do with Microsoft A/B testing different code/mechanisms at the moment.

1 Like

Deleting the registry key solved it. Thanks.

1 Like