Article ID: 263324 - Last Review: October 31, 2006 - Revision: 3.3 The Create Shortcut command truncates the source path folder names to eight charactersThis article was previously published under Q263324 On This PageSYMPTOMS When you create shortcuts and specify a long file name in
the target path, the path is truncated if the hard disk for the target does not
exist. For example, create a shortcut with the following target: J:\Mydirectory\Myapplication.exe If drive J does not exist, the path is truncated to: J:\Mydirect\Mypplica.exe CAUSE This problem can occur because the shell cannot determine
whether the hard disk supports long file names, so the path is truncated to be
acceptable to all file systems. STATUSMicrosoft
has confirmed that this is a problem in the Microsoft products that are listed
at the beginning of this article.
MORE INFORMATION This problem may be observed when you use any of the
following methods to create shortcuts:
The SMS Installer Create Shortcut MethodAn extract from an SMS Installer .ipf file that demonstrates the problem: item: Create Shortcut Source English=X:\Pw32\Alongdirectory\Blongdirectory\Longfilename.exe Destination English=C:\Winnt\Shortcut123.lnk Key Type English=1536 Flags=00000001 end X:\Pw32\Alongdir\Blongdir\Longfile.exe If you connect drive X to a share or use a subst command to point to a local drive and you run the script again, the shortcut is created with the correct target path: X:\Pw32\Alongdirectory\Blongdirectory\Longfilename.exe This problem is not caused by the SMS Installer. This problem occurs because the SMS Installer uses the IShellLink interface (refer to "The IShellLink Interface Method") to create shortcuts. The SMS Installer passes the full correct path name to the IShellLink interface, but the path is truncated when the IShellLink::SetPath operation is performed. The VBScript Create Shortcut methodA sample VBScript that demonstrates the problem:J:\My_long_\Myapplic.exe NOTE: Any characters that are not normally supported by file systems that do not want long file names, such as the space character, are replaced by the underscore symbol "_". To work around this problem, you can use the subst command to point drive J to a local hard disk: J:\My long directory\Myapplication.exe You can also use WshNetwork.MapNetworkDrive to connect drive J to a known share, create the shortcut as outlined in the preceding steps, and then remove drive J by using WshNetwork.RemoveNetworkDrive. The IShellLink Interface MethodAn extract of code that demonstrates the problem by using the IShellLink interface in Microsoft Visual C++:X:\Azertyui\Azertyui.exe This problem occurs on all versions of Windows NT 4.0 and Windows 2000. APPLIES TO
| Article Translations
|
Back to the top
