how to restore default "open with"/"choose program" menu?

R

Ric

Hi,

I tried to get extensionless files to open in notepad using this trick:

John Savill's FAQ for Windows
http://www.winnetmag.com/Article/ArticleID/14927/14927.html
September 15, 1999

Q. How do I create a default association for files with an unknown
extension?

A. Files with an unknown extension will bring up an "open with" dialog
when you double click on them however it is
possible to associate an application with files of an unknown type.
You can force this using the registry:

1. Start the registry editor (regedit.exe)
2. Move to HKEY_CLASSES_ROOT\Unknown\shell
3. From the Edit menu select New - Key
4. Enter a name of 'open' and press Enter (don't type the quotes)
5. Select the new 'open' key
6. From the Edit menu select New - Key
7. Enter a name of 'command' and press Enter (don't type the quotes)
8. Double click the (Default) value
9. Change to the application used to open, e.g. "NOTEPAD.EXE %1" for the
notepad.exe application (you need %1 to pass the document name to
notepad and depending on the application you may need %1 %*)
10. Click OK

However, after doing this when ever I right-click on a file and choose the
"open with"/"choose program" menu option, instead of getting the open with
dialog, the file would open in notepad instead. So I tried to reverse what I
did and after messing around for a bit, could not get it back to the
original behaviour. Now whenever I choose the "open with"/"choose program"
menu option, instead of the dialog, I get an error message: "This file does
not have a program associated with it for performing this action. Create an
association in the Folder Options control panel."

Can anyone tell me what registry entries I need to restore the default open
with dialog to this menu option?

Is it possible to associate extensionless files with an application without
otherwise messing up the open with dialog?

Thanks!
 
R

Ramesh, MS-MVP

This is a known problem. To fix the "Choose Program" setting, try this:

Open Regedit and navigate to:
HKEY_CLASSES_ROOT\Unknown\shell\openas\command

In the right-pane, double-click (default) and type the following value
exactly (REG_EXPAND_SZ)

%SystemRoot%\system32\rundll32.exe
%SystemRoot%\system32\shell32.dll,OpenAs_RunDLL %1

Automate the above with this REG file:
http://windowsxp.mvps.org/reg/openas.reg

Now, to associate "Files with no extension" with Notepad, follow my earlier
post here:
http://groups.google.co.in/groups?h...en&[email protected]
 
R

Ric

You rock!

Thanks so much.

Ramesh said:
This is a known problem. To fix the "Choose Program" setting, try this:

Open Regedit and navigate to:
HKEY_CLASSES_ROOT\Unknown\shell\openas\command

In the right-pane, double-click (default) and type the following value
exactly (REG_EXPAND_SZ)

%SystemRoot%\system32\rundll32.exe
%SystemRoot%\system32\shell32.dll,OpenAs_RunDLL %1

Automate the above with this REG file:
http://windowsxp.mvps.org/reg/openas.reg

Now, to associate "Files with no extension" with Notepad, follow my
earlier post here:
http://groups.google.co.in/groups?h...en&[email protected]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top