topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Friday December 13, 2024, 3:56 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Another Right-Click Menu question (except different)  (Read 5122 times)

rsteward

  • Supporting Member
  • Joined in 2010
  • **
  • default avatar
  • Posts: 22
    • View Profile
    • Donate to Member
Another Right-Click Menu question (except different)
« on: December 02, 2011, 10:24 AM »
I want to remove/disable the "CUT", "DELETE" and "RENAME" items from the right menu choices depending on certain rules (i.e. contents of folders, file path, only for certain directories).  The best example I can give is the way that TortoiseSVN alters the menu depending on if the item is added to the repository or not.  I've looked into the TSVN code and found some useful stuff but I'm unclear how it all ties together.  I've found where the items are added to the registry but I'm missing the "rule" functionality that is used to determine when to alter the menu.  I'm open to all ideas.

I've tried most the apps suggested in other topics with no avail.

Lammer Context Menu
FileMenu Tools
Right Click Enhancer
Mmm
(and a few others that are slipping my mind right now)

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
Re: Another Right-Click Menu question (except different)
« Reply #1 on: December 02, 2011, 12:52 PM »
http://www.howtogeek...indows-context-menu/

I don't think you can apply rules to the standard system items. You can edit the registry or use a tool to put them in the Right Click Menu or Shift Right Click Menu.

Otherwise each individual file type you are going to handle you have to write an IContextMenu handler(.dll.) When Windows calls your QueryContextMenu function, you would do whatever and decide if you want to put your commands in the menu.  Way too much work.

That's probably why you don't see any canned utilities doing it. Someone who writes a program with a dedicated file type(extension) may do some fancy stuff in the context menu handler if the program has shell integration. But to do it for the hundreds of file types registered... Windows will probably be only in museums before that happens.