Long File & Path Names Shorten When Launched Using AssociationLast reviewed: January 10, 1996Article ID: Q142275 |
The information in this article applies to:
SYMPTOMSWhen 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.
RESOLUTIONTo 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.
STATUSThis behavior is by design.
MORE INFORMATIONThe 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.
|
Additional reference words: 4.00
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |