Custom item loses track of link on rename
Start menu and Windows enhancement software
Brought to you by:
ibeltchev
I created a folder in my documents folder and then put a custom item on the ClassicShell menu linking to it. Then I tried to rename it using the rename context menu item. It renamed the folder all right, but it didn't change the link to point to the updated name, so the custom item stopped working. It now had an invalid link. I had to edit the custom item manually (I double clicked on the item and re-browsed to the folder.) The problem is easily worked around, but the problem should be avoided by automatically updating the link.
This is not a bug. Links created using Classic Shell are not supposed to fix themselves automatically like system shortcuts do. If you rename items, create a link to their parent folder so renaming won't break anything.
It is not that simple. The link target is stored in the registry and is part of the start menu settings. There are many things that can go wrong if the start menu tries to keep the link in sync. For example renames done in Explorer won't be tracked. Undoing the rename from Explorer also won't be tracked. You may have opened the settings UI and editing something else at the moment.
I think a better solution is to not allow Delete or Rename for custom items.
I see what's happening now. The context menu that comes up when you right click on the custom item is the system one for the folder, not a special context menu for ClassicShell. So when you rename or delete, it renames or deletes the folder, not the custom menu item. As you say, it's not a bug, just unexpected for the uninitiated. It would be helpful to document what "context" the context menu is referring to, but the code is doing what it is designed to do. Stress in the documentation that if you rename or delete from the right click menu, you are changing the folder, not the menu item and you also have to use the ClassicShell custom item editor to update the link or remove the custom item. If a folder gets deleted by mistake it can be retrieved from the recycle bin, so nothing is irretrievably lost if the user wanted to delete the menu item and not the folder.
Are programs capable of fixing the shortcuts like Windows can? Can the Start Menu store the object identifiers of the targets of all defined custom command "Items" so that it can look up in the NTFS MFT if a file is renamed or moved and correct the link path to it? If the file is deleted, it can ask the user (Yes/No?) to remove the dead link. For Windows file shortcuts, there is a Link Tracking service that does this: http://msdn.microsoft.com/en-us/library/windows/desktop/aa363997(v=vs.85).aspx Dunno if this is possible for programs to do it.
Last edit: xpclient 2012-11-27
This is not possible in the general case, as the link may point to files, folders, control panel items, etc, not all of which are really NTFS objects. It gets even more complicated if you save your settings to a file and restore them later or transfer to another machine.
In the general case it is assumed that when you are editing your start menu structure you know what you are doing.
The new version 3.6.3 will not let you rename or delete a custom item (at least from the start menu). If you go to Explorer and delete the folder, well, you get what you deserve.