UNC Path displayed with short name under TC, but explorer displays it with long name
Moderators: Hacker, petermad, Stefan2, white
UNC Path displayed with short name under TC, but explorer displays it with long name
Hi,
I'm using TC v9.51 64 bit, on Win7 Pro.
When I browse the Network shares of the company, the path contains a tild (~) in the navigation bar (bellow the drive's drop-drop list).
Example :
* With Wndows Explorer : \\private.server.company.com\PROJECT\PROJECT_XXXX\
* With TC : \\private.server.company.com\PROJECT\PROJEC~1\
Thanks in advance.
I'm using TC v9.51 64 bit, on Win7 Pro.
When I browse the Network shares of the company, the path contains a tild (~) in the navigation bar (bellow the drive's drop-drop list).
Example :
* With Wndows Explorer : \\private.server.company.com\PROJECT\PROJECT_XXXX\
* With TC : \\private.server.company.com\PROJECT\PROJEC~1\
Thanks in advance.
Last edited by Millenod on 2020-08-20, 12:56 UTC, edited 2 times in total.
- ghisler(Author)
- Site Admin
- Posts: 50873
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: UNC Path displayed with short name under TC, but explorer displays it with long name
That seems to be the alternate DOS name of that directory. How did you get there? Normally you should be able to see the full name by going one directory up. Then just double click on the full name.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: UNC Path displayed with short name under TC, but explorer displays it with long name
I used this script :
Filename: network_share.vbs
In the drop-down drive list I choose "Computer", then "PROJECT_XXX".
The link displayed on the bar is : "\\private.server.company.com\PROJEC2~1"
I don't have this problem with windows explorer.
If i go up to the directories. It swicth back to full name.
Filename: network_share.vbs
Code: Select all
Option Explicit
Function CreateNetworkLocation( networkLocationName, networkLocationTarget )
Const ssfNETHOOD = &H13&
Const fsATTRIBUTES_READONLY = 1
Const fsATTRIBUTES_HIDDEN = 2
Const fsATTRIBUTES_SYSTEM = 4
CreateNetworkLocation = False
' Instantiate needed components
Dim fso, shell, shellApplication
Set fso = WScript.CreateObject("Scripting.FileSystemObject")
Set shell = WScript.CreateObject("WScript.Shell")
Set shellApplication = WScript.CreateObject("Shell.Application")
' Locate where NetworkLocations are stored
Dim nethoodFolderPath, networkLocationFolder, networkLocationFolderPath
nethoodFolderPath = shellApplication.Namespace( ssfNETHOOD ).Self.Path
' Create the folder for our NetworkLocation and set its attributes
networkLocationFolderPath = fso.BuildPath( nethoodFolderPath, networkLocationName )
If fso.FolderExists( networkLocationFolderPath ) Then
Exit Function
End If
Set networkLocationFolder = fso.CreateFolder( networkLocationFolderPath )
networkLocationFolder.Attributes = fsATTRIBUTES_READONLY
' Write the desktop.ini inside our NetworkLocation folder and change its attributes
Dim desktopINIFilePath
desktopINIFilePath = fso.BuildPath( networkLocationFolderPath, "desktop.ini" )
With fso.CreateTextFile(desktopINIFilePath)
.Write "[.ShellClassInfo]" & vbCrlf & _
"CLSID2={0AFACED1-E828-11D1-9187-B532F1E9575D}" & vbCrlf & _
"Flags=2" & vbCrlf
.Close
End With
With fso.GetFile( desktopINIFilePath )
.Attributes = fsATTRIBUTES_HIDDEN + fsATTRIBUTES_SYSTEM
End With
' Create the shortcut to the target of our NetworkLocation
Dim targetLink
targetLink = fso.BuildPath( networkLocationFolderPath, "target.lnk" )
With shell.CreateShortcut( targetLink )
.TargetPath = networkLocationTarget
.Save
End With
' Done
CreateNetworkLocation = True
End Function
CreateNetworkLocation "PROJECT_XXX", "\\private.server.company.com\PROJECT\PROJECT_XXXX\"
In the drop-down drive list I choose "Computer", then "PROJECT_XXX".
The link displayed on the bar is : "\\private.server.company.com\PROJEC2~1"
I don't have this problem with windows explorer.
If i go up to the directories. It swicth back to full name.
Re: UNC Path displayed with short name under TC, but explorer displays it with long name
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Re: UNC Path displayed with short name under TC, but explorer displays it with long name
I'm working in a large company + 100.000 employees.
We do "Flex office" ; Each day we don't have the same desk/office and computers.
This script is attached to my session profile and create all the links to the network shares I need.
We do "Flex office" ; Each day we don't have the same desk/office and computers.
This script is attached to my session profile and create all the links to the network shares I need.
-
- Power Member
- Posts: 872
- Joined: 2013-09-04, 14:07 UTC
Re: UNC Path displayed with short name under TC, but explorer displays it with long name
Hmm, i tried your script (with a shared network folder provided by Samba running on my NAS) using "Project_SomethingSomething" (literally) as directory, and i can not reproduce the observed effect. I wonder what's going on there...
Directly after creating the .lnk file, without trying to otherwise open that .lnk file directly or indirectly, look into it with TC's viewer. Does the created .lnk file by any chance contain the short path? (It should not, but it seems you are working in a domain environment, and i have no clue about what funky things could happen in a domain...)
Directly after creating the .lnk file, without trying to otherwise open that .lnk file directly or indirectly, look into it with TC's viewer. Does the created .lnk file by any chance contain the short path? (It should not, but it seems you are working in a domain environment, and i have no clue about what funky things could happen in a domain...)
Re: UNC Path displayed with short name under TC, but explorer displays it with long name
The link is located here :
c:\Users\<account_name>\AppData\Roaming\Microsoft\Windows\Network Shortcuts\<Shortcut_name>\target.lnk
Right click>properties on the target.lnk file :
A windows opens.
Tab 2 "shortcut". target = full path. No other visibles links on every tabs and fields
With TC viewer (F3) :
String 1 : full path (ASCII)
String 2 : domain (unicode?)
String 3 : domain with main share ? (ASCII)
string 4 : project folder : short name!
string 5 : project folder : long name (unicode?)
string 6 : full path (ASCII)
string 7 : full path (unicode?)
I start Windows Explorer :
I paste the link : c:\Users\<account_name>\AppData\Roaming\Microsoft\Windows\Network Shortcuts\<Shortcut_name>\
I double click on the target link
On the windows explorer bar, i can see : c:\Users\<account_name>\AppData\Roaming\Microsoft\Windows\Network Shortcuts\<Structure of the shared folders>
I click on the bar, it's now displayed : \\private.server.company.com\PROJECT\PROJECT_XXXX\ (full name)
c:\Users\<account_name>\AppData\Roaming\Microsoft\Windows\Network Shortcuts\<Shortcut_name>\target.lnk
Right click>properties on the target.lnk file :
A windows opens.
Tab 2 "shortcut". target = full path. No other visibles links on every tabs and fields
With TC viewer (F3) :
String 1 : full path (ASCII)
String 2 : domain (unicode?)
String 3 : domain with main share ? (ASCII)
string 4 : project folder : short name!
string 5 : project folder : long name (unicode?)
string 6 : full path (ASCII)
string 7 : full path (unicode?)
I start Windows Explorer :
I paste the link : c:\Users\<account_name>\AppData\Roaming\Microsoft\Windows\Network Shortcuts\<Shortcut_name>\
I double click on the target link
On the windows explorer bar, i can see : c:\Users\<account_name>\AppData\Roaming\Microsoft\Windows\Network Shortcuts\<Structure of the shared folders>
I click on the bar, it's now displayed : \\private.server.company.com\PROJECT\PROJECT_XXXX\ (full name)
Last edited by Millenod on 2020-08-19, 08:07 UTC, edited 1 time in total.
Re: UNC Path displayed with short name under TC, but explorer displays it with long name
With Windows Explorer, I've created a shorcut on the network share folder.
I've copy this lnk file to : c:\Users\<account_name>\AppData\Roaming\Microsoft\Windows\Network Shortcuts\<Shortcut_name>\target.lnk
Now Everything is OK in Total Commander.
If I analyse the content of this new lnk file with TC viewer :
String 1 : full path (ASCII)
String 2 : folder name (unicode?)
String 3 : a description (in french : dossier de fichiers. i can translate it by "Folder of files")
String 4 : domain with main share ? (ASCII)
String 5 : full path (unicode?)
String 6 : domain (unicode?)
String 7 : domain with main share ? (ASCII)
string 8 : project folder : long name (unicode?)
string 9 : full path (ASCII)
string 10 : full path (unicode?
In conclusion : The problem comes from the script.
I've copy this lnk file to : c:\Users\<account_name>\AppData\Roaming\Microsoft\Windows\Network Shortcuts\<Shortcut_name>\target.lnk
Now Everything is OK in Total Commander.
If I analyse the content of this new lnk file with TC viewer :
String 1 : full path (ASCII)
String 2 : folder name (unicode?)
String 3 : a description (in french : dossier de fichiers. i can translate it by "Folder of files")
String 4 : domain with main share ? (ASCII)
String 5 : full path (unicode?)
String 6 : domain (unicode?)
String 7 : domain with main share ? (ASCII)
string 8 : project folder : long name (unicode?)
string 9 : full path (ASCII)
string 10 : full path (unicode?
In conclusion : The problem comes from the script.
Re: UNC Path displayed with short name under TC, but explorer displays it with long name
That's what I assumed, too. I'm pretty sure there are people here in the forum that can find and fix the issue (I don't know enough about VBS to do so). Maybe a PowerShell script could be used as well to create such links.
Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Re: UNC Path displayed with short name under TC, but explorer displays it with long name
I read a little the specifications of the .lnk binary file format.
There are many fields : some are mandatories, others not.
I don't have a debug tool to analyse and compare the 2 lnk files.
I will report the problem to the sys admin. Because I don't use the classic company tools, they may not fix it..
At least it was an interesting case
Thanks for your help.
There are many fields : some are mandatories, others not.
I don't have a debug tool to analyse and compare the 2 lnk files.
I will report the problem to the sys admin. Because I don't use the classic company tools, they may not fix it..
At least it was an interesting case

Thanks for your help.
Re: UNC Path displayed with short name under TC, but explorer displays it with long name
I discover today a funny things.
If I don't use the company script and add manually a network share with windows, I have the same problem about short names:
To reproduce it :
On the desktop, double click on "Computer" icon
* Click "Add Network Location" button
* Click on the link "connect on a web site that allow to store documents and images"
* A windows appears "Add a network location ". click next
* Click on "Choose a custom network location". next
* I type : "\\private.server.company.com\PROJECT\PROJECT_XXXX\", then next
* I give the name of the link "PROJECT XXXX", then next, then close the window.
If I don't use the company script and add manually a network share with windows, I have the same problem about short names:
To reproduce it :
On the desktop, double click on "Computer" icon
* Click "Add Network Location" button
* Click on the link "connect on a web site that allow to store documents and images"
* A windows appears "Add a network location ". click next
* Click on "Choose a custom network location". next
* I type : "\\private.server.company.com\PROJECT\PROJECT_XXXX\", then next
* I give the name of the link "PROJECT XXXX", then next, then close the window.
- ghisler(Author)
- Site Admin
- Posts: 50873
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: UNC Path displayed with short name under TC, but explorer displays it with long name
Can anyone reproduce this?
I tried this in Windows 10, but the link appears as
"PROJECT XXXX"
in Total Commander under "Computer".
I tried this in Windows 10, but the link appears as
"PROJECT XXXX"
in Total Commander under "Computer".
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com