|
| | |||||||
| Windows XP Discuss the Microsoft Windows XP Operating System |
| | LinkBack | Thread Tools |
| |||
| How to add a new item to the context menu of folders The following registry extension will add the item "Dir /S" to the folder context menu. By selecting this item the command file (DOS batch file) "C:\BAT\_DirS.cmd" is executed. [HKEY_CLASSES_ROOT\Directory\shell\CMD1] @="Dir /S" [HKEY_CLASSES_ROOT\Directory\shell\CMD1\Command] @="C:\\BAT\\_DirS.cmd" In the same way the following registry extension will add the item "Create _ReadMe.txt" to the folder context menu. But the script file "C:\BAT\_ReadMe.vbs" will NOT run when I select "" in the folder menu. [HKEY_CLASSES_ROOT\Directory\shell\CMD2] @="Create _ReadMe.txt" [HKEY_CLASSES_ROOT\Directory\shell\CMD2\Command] @="C:\\BAT\\_ReadMe.vbs" How can I change it so that a script file can be executed ? Is the trick that "Command" in "...\CMD2\Command" should be replaced by something else ? |
| |||
| Re: How to add a new item to the context menu of folders Hi, >> How can I change it so that a script file can be executed ? Use: [HKEY_CLASSES_ROOT\Directory\shell\CMD2] @="Create _ReadMe.txt" [HKEY_CLASSES_ROOT\Directory\shell\CMD2\Command] @="wscript.exe \"C:\\BAT\\_ReadMe.vbs\"" -- Regards, Ramesh Srinivasan, Microsoft MVP [Windows XP Shell/User] Windows® XP Troubleshooting http://www.winhelponline.com "Helge V. Larsen" <Helge.V.Larsen_Remove_this@Risoe_Remove_this.DK > wrote in message news:OUup0pABHHA.4680@TK2MSFTNGP04.phx.gbl... The following registry extension will add the item "Dir /S" to the folder context menu. By selecting this item the command file (DOS batch file) "C:\BAT\_DirS.cmd" is executed. [HKEY_CLASSES_ROOT\Directory\shell\CMD1] @="Dir /S" [HKEY_CLASSES_ROOT\Directory\shell\CMD1\Command] @="C:\\BAT\\_DirS.cmd" In the same way the following registry extension will add the item "Create _ReadMe.txt" to the folder context menu. But the script file "C:\BAT\_ReadMe.vbs" will NOT run when I select "" in the folder menu. [HKEY_CLASSES_ROOT\Directory\shell\CMD2] @="Create _ReadMe.txt" [HKEY_CLASSES_ROOT\Directory\shell\CMD2\Command] @="C:\\BAT\\_ReadMe.vbs" How can I change it so that a script file can be executed ? Is the trick that "Command" in "...\CMD2\Command" should be replaced by something else ? |
| |||
| Re: How to add a new item to the context menu of folders How about: @="notepad.exe" "%L\ReadMe.txt" "Helge V. Larsen" <Helge.V.Larsen_Remove_this@Risoe_Remove_this.DK > wrote in message news:OUup0pABHHA.4680@TK2MSFTNGP04.phx.gbl... > The following registry extension will add the item "Dir /S" to the folder > context menu. > By selecting this item the command file (DOS batch file) > "C:\BAT\_DirS.cmd" is executed. > > [HKEY_CLASSES_ROOT\Directory\shell\CMD1] > @="Dir /S" > > [HKEY_CLASSES_ROOT\Directory\shell\CMD1\Command] > @="C:\\BAT\\_DirS.cmd" > > In the same way the following registry extension will add the item "Create > _ReadMe.txt" to the folder context menu. > But the script file "C:\BAT\_ReadMe.vbs" will NOT run when I select "" in > the folder menu. > > [HKEY_CLASSES_ROOT\Directory\shell\CMD2] > @="Create _ReadMe.txt" > > [HKEY_CLASSES_ROOT\Directory\shell\CMD2\Command] > @="C:\\BAT\\_ReadMe.vbs" > > How can I change it so that a script file can be executed ? > > Is the trick that "Command" in "...\CMD2\Command" should be replaced by > something else ? > > > |
| |||
| Re: How to add a new item to the context menu of folders How about: @="notepad.exe" "%L\ReadMe.txt" "Helge V. Larsen" <Helge.V.Larsen_Remove_this@Risoe_Remove_this.DK > wrote in message news:OUup0pABHHA.4680@TK2MSFTNGP04.phx.gbl... > The following registry extension will add the item "Dir /S" to the folder > context menu. > By selecting this item the command file (DOS batch file) > "C:\BAT\_DirS.cmd" is executed. > > [HKEY_CLASSES_ROOT\Directory\shell\CMD1] > @="Dir /S" > > [HKEY_CLASSES_ROOT\Directory\shell\CMD1\Command] > @="C:\\BAT\\_DirS.cmd" > > In the same way the following registry extension will add the item "Create > _ReadMe.txt" to the folder context menu. > But the script file "C:\BAT\_ReadMe.vbs" will NOT run when I select "" in > the folder menu. > > [HKEY_CLASSES_ROOT\Directory\shell\CMD2] > @="Create _ReadMe.txt" > > [HKEY_CLASSES_ROOT\Directory\shell\CMD2\Command] > @="C:\\BAT\\_ReadMe.vbs" > > How can I change it so that a script file can be executed ? > > Is the trick that "Command" in "...\CMD2\Command" should be replaced by > something else ? > > > |
| Bookmarks |
| Thread Tools | |
| |
| | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Re: 'Run as administrator' Context Menu Item | Richard G. Harper | Windows Vista | 0 | 05-26-2008 03:10 AM |
| Context Menu Item | Ryan | Windows Vista | 0 | 01-23-2008 11:40 AM |
| how to remove the manage item from my computer's context menu? | ILiya | Windows XP | 2 | 12-19-2007 04:30 AM |
| Context menu item problem in Vista | Daze N. Knights | Windows Vista | 3 | 01-09-2007 10:45 AM |
| How do I create a new context menu item for files in Windows Explo | Bizily | Windows XP | 2 | 01-05-2007 07:45 AM |
| New To Technology Questions? | Do You Need Help with Your Computer or Device? | Do You Need Help with this site? |