Wilson WindowWare Tech Support

WinBatch WinBatch+Compiler WebBatch
Home | Tech Database | Tech BBS | White Papers | Purchase


Add new item to right-click menu of 'My Computer'

Keywords:   Add new menu item to right-click menu of My Computer

Question:

I want to add a new item to the right-click menu of "My Computer". I've noticed that the Novell client adds several new items to the right-click menu of "My Network Neighborhood" so I figure there is a way to do the same to the "My Computer". Thanx for any assistance.

Answer:

Paint shop pro adds an entry in the registry under:
HKEY_CLASSES_ROOT\Folder\shell\Browse with Paint Shop Pro\command
the command string value is the path of the application, clicking on the menu item launches the app, maybe this can help?

For example,

key="Folder\shell\Calculator\command"
RegSetExpSz(@REGCLASSES,key,"calc.exe")
However it adds it to The "My Computer" icon and all the folders on the system. Interesting to play with though.

You'll need to test whether to use RegSetExpSz or RegSetValue, on different OS's, etc. Another user provided the following bit of code:

;Add calc.exe to the My Computer menu item
key = "CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\Calculator\command"
RegSetValue(@REGCLASSES, key, "calc.exe")

;Remove it/...
key = "CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\Calculator"
RegDelValue(@REGCLASSES,key)