What meaning is Path & %1 in Registry(Null)

  • Thread starter Thread starter yxq
  • Start date Start date
Usually I have seen %1 to mean a command line argument of some kind. Take
this following registry command file for example:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Folder\shell\CmdPrompt]
@="CMD Prompt"

[HKEY_CLASSES_ROOT\Folder\shell\CmdPrompt\command]
@="c:\\winnt\\System32\\cmd.exe /k cd \"%l\""

This will add a right click menu to folders in Windows Explorer that allows
you to open a command prompt window at that location. In this case the %1
means that the cmd.exe file will be run and the currently clicked on folder
path will be passed in to the command string as an argument.
 
Oh, and in case you tried this on WinXP (thsi adds a real nice contect menu
to folders by the way) you have to modify the path to cmd.exe to read as
follows:

c:\\windows\\system32\\cmd.exe


Ray Cassick (Home) said:
Usually I have seen %1 to mean a command line argument of some kind. Take
this following registry command file for example:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Folder\shell\CmdPrompt]
@="CMD Prompt"

[HKEY_CLASSES_ROOT\Folder\shell\CmdPrompt\command]
@="c:\\winnt\\System32\\cmd.exe /k cd \"%l\""

This will add a right click menu to folders in Windows Explorer that allows
you to open a command prompt window at that location. In this case the %1
means that the cmd.exe file will be run and the currently clicked on folder
path will be passed in to the command string as an argument.
 
Back
Top