Y
Yan Bilik
Hello,
I have written a simple test batch file (let's say c:\test.cmd), which
contains the following commands:
---------
@echo %1
pause
---------
I have also written a Reg file and merged it to the registry:
---------
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\xmlfile\shell\test]
@="test"
[HKEY_CLASSES_ROOT\xmlfile\shell\test\command]
@="CMD.EXE /c c:\test.cmd %1"
---------
The aim is to get a new context menu named "test" when I right click an
XML file.
Under Windows 2000, it works fine with any kind of file. But under
Windows XP Pro, if I launch that new menu item for a long filename, my
batch receive the *short* corresponding filename, and I found no way to
get the long filename back...
Example:
- file is c:\temp\alongfilename.xml
- right-click it, choose "test"
- a command-line window is opened and displays
c:\temp\ALONGF~1.XML
Hit any key...
Note another strange thing: it works fine (i.e. I got the longfilename)
if I call the command from a command-line window:
C:> CMD.EXE /c c:\test.cmd c:\temp\alongfilename.xml
c:\temp\alongfilename.xml
Hit any key...
Any idea ?
Yan
I have written a simple test batch file (let's say c:\test.cmd), which
contains the following commands:
---------
@echo %1
pause
---------
I have also written a Reg file and merged it to the registry:
---------
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\xmlfile\shell\test]
@="test"
[HKEY_CLASSES_ROOT\xmlfile\shell\test\command]
@="CMD.EXE /c c:\test.cmd %1"
---------
The aim is to get a new context menu named "test" when I right click an
XML file.
Under Windows 2000, it works fine with any kind of file. But under
Windows XP Pro, if I launch that new menu item for a long filename, my
batch receive the *short* corresponding filename, and I found no way to
get the long filename back...
Example:
- file is c:\temp\alongfilename.xml
- right-click it, choose "test"
- a command-line window is opened and displays
c:\temp\ALONGF~1.XML
Hit any key...
Note another strange thing: it works fine (i.e. I got the longfilename)
if I call the command from a command-line window:
C:> CMD.EXE /c c:\test.cmd c:\temp\alongfilename.xml
c:\temp\alongfilename.xml
Hit any key...
Any idea ?
Yan