2

How in Windows (in my case 8.1) set the default app that would be set as default for all files that don't have a default app specified?

More specifically, it should act as a fallback app for all files. Meaning, if for a given file the default app is not specified, the fallback is used, otherwise the specified default is used.

Even more specifically:

  • Specify Notepad as the fallback
  • There's a file config(the default isn't specified)
  • There's a file config.cfg(the default [for .cfg] is Vim)
  • When opening config, Notepad is used
  • When opening config.cfg, Vim is used
  • If Vim ceases to exist(later becomes uninstalled), when opening config.cfg, Notepad is used
2
  • There is a way by modifying registry values, but could you provide an example like which extension, which program is first and second preference etc.?
    – Biswapriyo
    Feb 2 '20 at 8:52
  • @biswapriyo the OP is saying for all non-specified extensions, i.e., a catch-all.
    – Arctiic
    Feb 2 '20 at 9:09
0

The best choice might be to add a right-click context menu entry for the "wild card" extension, asterisk. Any file, when right-clicked, would have an option to open with Notepad.

Notepad as wild card choice

  • Open Regedit by pressing Windows, entering rege and selecting Regedit.
  • Scroll to HKCR\*\shell.
  • Right-click on shell and select New > Key.
  • Name the key Notepad.
  • Right-click on Notepad and select New > Key.
  • Name the key command.
  • Double-click Default and change the text to notepad.exe "%1".

You can also save the following script as a .reg file and merge it. The script also adds the Notepad icon to the context menu entry.

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\*\shell\Notepad]
"Icon"="Notepad.exe,0"

[HKEY_CLASSES_ROOT\*\shell\Notepad\command]
@="Notepad.exe \"%1\""

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.