hidden hit counter
Welcome to WindowsForumz.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

How to add a new item to the context menu of folders

 
   Win 2000/NT/98/ME (Home) -> Registry RSS
Next:  Millenium to XP Upgrade & Outlook Express pro..  
Author Message
Helge V. Larsen

External


Since: Nov 09, 2006
Posts: 1



(Msg. 1) Posted: Thu Nov 09, 2006 3:22 pm
Post subject: How to add a new item to the context menu of folders
Archived from groups: microsoft>public>win2000>registry, others (more info?)

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 ?

 >> Stay informed about: How to add a new item to the context menu of folders 
Back to top
Login to vote
Ramesh, MS-MVP

External


Since: Jun 29, 2005
Posts: 31



(Msg. 2) Posted: Thu Nov 09, 2006 8:10 pm
Post subject: Re: How to add a new item to the context menu of folders [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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" wrote in
message
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 ?

 >> Stay informed about: How to add a new item to the context menu of folders 
Back to top
Login to vote
NewScience

External


Since: Aug 10, 2006
Posts: 25



(Msg. 3) Posted: Mon Nov 13, 2006 9:57 pm
Post subject: Re: How to add a new item to the context menu of folders [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

How about:

@="notepad.exe" "%L\ReadMe.txt"

"Helge V. Larsen" wrote in
message
> 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 ?
>
>
>
 >> Stay informed about: How to add a new item to the context menu of folders 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Creating a context menu item "Open with MyEditor" for all .. - Hi, I was using a text editor which added an item to the top of the context menu: "Open with Editor". This made it possible to open absolutely every file on my computer with this program regardless of what the file was associated with. I have ...

can I add a menuitem for all popup menu? - Hello everyone, as I said in the title, is it possible? Thanks very much!

Error in HKLM Shell Folders - Hi, I have a great problem with the Windows XP Local registry: i don't see the Programs menu, only seeing an '(Empty)' advertising... but if i accessing by Windows Explorer, the Programs menu contents exists into D:\Document and Settings\user\Menú..

ShellNew Syntax - Hi all in this group. I'm trying to be 'clever' and add an option to my right-mouse New Context menus on my NT4 machine to be able to easily create a new text file. I have added the appropriate 'ShellNew' registry entries as below: ..

Disabling caption buttons - Is there any way to disable close and minimize caption buttons from explorer window? If so please advise
   Win 2000/NT/98/ME (Home) -> Registry All times are: Eastern Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum

Categories:
 Windows XP
  Win 2000/NT/98/ME
 Windows Vista!


[ Contact us | Terms of Service/Privacy Policy ]