Long File & Path Names Shorten When Launched Using Association (142275)
The information in this article applies to:
- Microsoft Platform Software Development Kit (SDK) 1.0, when used with:
- Microsoft Windows NT Server 3.51
- Microsoft Windows NT Workstation 3.51
This article was previously published under Q142275 SYMPTOMS
When an application is installed along a path that contains a space (as in
C:\Program Files\MyApp) and you double-click a data file registered to
MyApp.exe in Explorer (or any other shell), you will only get a short file
name on the command line.
RESOLUTION
To resolve the problem, place quotation marks around the around the
arguments list in the registry entries, as in this example:
HKEY_CLASSES_ROOT\MyApp\Shell\Open\Command =
<path to MyApp.exe> "%1"
Without the quotation marks, short names are the result. With quotation
marks, long file names are the result. This works correctly in Windows 95
and Windows NT 3.51.
STATUS
This behavior is by design.
MORE INFORMATION
The 8.3 file name specification didn't allow spaces in filenames, so the
system automatically converts long file names to short filenames when no
quotation marks are used to differenciate between a long file name and
a list of short names seperated by spaces.
Basically the shell looks at the .exe type of the program refered to,
if it is a win32 .exe, the shell passes a long name by default (as %1), if
it is not, the shell passes the short name. The code that sniffs the .exe
type requires the quotation marks to get this right.
Modification Type: | Minor | Last Reviewed: | 7/11/2005 |
---|
Keywords: | kbenv KB142275 |
---|
|