"The directory name is invalid" error
Posted: 25 Sep 2012 23:15
I've got a very handy registry hack that I wrote that allows me to make a command prompt almost anywhere I can browse to by right-clicking on a folder and choosing "Command Prompt". Unfortunately, it doesn't work when I do it on something like \\servername\sharename in XYplorer, though it works as expected with Windows Explorer and xplorer2. The registry entries are made from a .REG file called CommandPrompt.reg with the following entries:
[HKEY_CLASSES_ROOT\Folder\shell\Command_Prompt]
@="Command Prompt"
[HKEY_CLASSES_ROOT\Folder\shell\Command_Prompt\command]
@="cmd.exe /k cls & pushd %L & title Command Prompt & prompt $m$_$p$g"
With this enhancement I am to explore to \\servername\sharename (even if it's \\servername\c$) and then right-click on it and choose "Command Prompt", which would then give me a command prompt with the Z: drive (or last available drive letter if Z: is taken) mapped to \\servername\sharename, and then sitting on that newly mapped drive. VERY handy, and I use it dozens of times a week while administering my network. Feel free to use it yourself! Microsoft used to have a PowerToy version of this, but it never worked properly since it reacted differently based on whether the folder you right-click on is in the tree or pane.
In any case, this enhancement causes an error box to appear when attempted on a share name XYplorer, such as \\servername\sharename. It works properly if I choose a folder under the share. Meaning, if I right-click on \\servername\sharename\foldername and choose Command Prompt, I'll find myself in Z:\foldername (if Z: is available). I've tried it under 32bit Windows 7, and will be trying it soon under 64bit Windows 7.
Any hope for a fix? Thanks!
DrBunsen
Ray
[HKEY_CLASSES_ROOT\Folder\shell\Command_Prompt]
@="Command Prompt"
[HKEY_CLASSES_ROOT\Folder\shell\Command_Prompt\command]
@="cmd.exe /k cls & pushd %L & title Command Prompt & prompt $m$_$p$g"
With this enhancement I am to explore to \\servername\sharename (even if it's \\servername\c$) and then right-click on it and choose "Command Prompt", which would then give me a command prompt with the Z: drive (or last available drive letter if Z: is taken) mapped to \\servername\sharename, and then sitting on that newly mapped drive. VERY handy, and I use it dozens of times a week while administering my network. Feel free to use it yourself! Microsoft used to have a PowerToy version of this, but it never worked properly since it reacted differently based on whether the folder you right-click on is in the tree or pane.
In any case, this enhancement causes an error box to appear when attempted on a share name XYplorer, such as \\servername\sharename. It works properly if I choose a folder under the share. Meaning, if I right-click on \\servername\sharename\foldername and choose Command Prompt, I'll find myself in Z:\foldername (if Z: is available). I've tried it under 32bit Windows 7, and will be trying it soon under 64bit Windows 7.
Any hope for a fix? Thanks!
DrBunsen
Ray