JSI Tip 1587. How do I define a default open for files with no extension?


You can define shell extensions for files with no file extension by using Regedt32 to navigate to:

HKEY_CLASSES_ROOT

01. Select the HKEY_CLASSES_ROOT key, an alias for HKEY_LOCAL_MACHINE\SOFTWARE\Classes.

02. On the Edit menu, Add Key and type . into Key Name.

03. Click OK.

04. With the HKEY_CLASSES_ROOT\. key selected, Add Value, but leave the Value Name blank.

05. Click OK to define this <No Name> value as the default type REG_SZ (string).

06. In the String Editor, type JSIINC and click OK.

07. Select the HKEY_CLASSES_ROOT key.

08. On the Edit menu, Add Key and type JSIINC into Key Name and click OK.

09. Select the HKEY_CLASSES_ROOT\JSIINC key.

10. On the Edit menu, Add Key and type shell into Key Name and click OK.

11. Select the HKEY_CLASSES_ROOT\JSIINC\shell key.

12. On the Edit menu, Add Key and type open into Key Name and click OK.

13. Select the HKEY_CLASSES_ROOT\JSIINC\shell\open key.

14. On the Edit menu, Add Key and type command into Key Name and click OK.

15. Select the HKEY_CLASSES_ROOT\JSIINC\shell\open\command key.

16. On the Edit menu, Add Value, but leave the Value Name blank.

17. Click OK to define this <No Name> value as the default type REG_SZ (string).

18. In the String Editor, type the full path to the program that will open the file, followed by "%1".
      Example: c:\winnt\notepad.exe "%1".

19. Click OK and exit the registry editor.

You can now double click on a file with no extension and it will open using the program defined in step 18.

To define this association with a .REG file:

REGEDIT4

\[HKEY_CLASSES_ROOT\.\]
@="JSIINC"

\[HKEY_CLASSES_ROOT\JSIINC\]

\[HKEY_CLASSES_ROOT\JSIINC\shell\]

\[HKEY_CLASSES_ROOT\JSIINC\shell\open\]

\[HKEY_CLASSES_ROOT\JSIINC\shell\open\command\]
@="c:\\winnt\\notepad.exe \"%1\""


NOTE: You may have to alter the path of the last line.
Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish