If context menu key that launches some executable exists in Windows registry and the "%1"
command line patrameter place holder is mentioned, the path this executable gets over GetCommandLine()
is limited to MAX_PATH
and in some cases Windows tries to make the short path name out of it.
Example:
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\*\shell\showpath\command]
@="\"C:\\Program Files (x86)\\Utilities\\COMLINE.EXE\" \"%1\""
When the path is:
"\\\\SERVER\MediaFilder25\Philosophic\20220407 Draft thoughts. Questions without answers on the background of the torn Internet\20220407-1 Draft thoughts. Questions without answers on the background of the torn Internet\20220407 Draft thoughts. Questions without answers on the background of the torn Internet.ysssss"
COMLINE.EXE will get following:
"\\\\SERVER\MediaFilder25\39FC~1\202204~3\202204~2\20220407 Draft thoughts. Questions without answers on the background of the torn Internet.ysssss"
Nowadays string
length isn't limited. NTFS path depth isn't limited, too.
How to overcome this?
There is a way in registry to allow long paths, explained in this URL.
I comes down to the following registry key:
In order to know your current value, you might do this:
It is limited to Windows 10, Version 1607, and Later, but your question is about Windows 7.