JSI Tip 0427 - Do you get an error when you double click on a file with a known extension?

Jerold Schulman

February 20, 1998

1 Min Read
ITPro Today logo in a gray background | ITPro Today

If the path to this file has a space in one of the directory names, and/or the path to the .exe has a space in one of the directory names, chances are that the command and parameter at the
HKEY_CLASSES_ROOT/string/shell/open/command are not enclosed in double-quotes.

To find the string, at a CMD prompt, type: assoc .ext where .ext is the extension of the file you double-clicked. This will return the string.

Navigate to the value, double click it, and enclose the full path in quotes and each parameter in quotes. Example:

C:Program FilesWindows NTAccessorieswordpad.exe %1 at
HKEY_CLASSES_ROOT/Wordpad.Document.1/shell/open/command
would become "C:Program FilesWindows NTAccessorieswordpad.exe" "%1"

Note: Some programs work regardless of wether the quotes are there or not. Some programs use 8.3 convention instead of quotes.

While your there, if there are other Actions for this string, such as print, correct them also.


Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like