View Full Version : identifying and renaming a shortcut

Lou Elston
07-14-2004, 03:29 PM
I know how to use the IDE to create shortcuts. I need to put some code in the script to first rename some old shortcuts, (we do not wish to delete them), before I create the new\replacement shortcuts.

I need to find a particular shortcut, both on the desktop, and in start\programs\etc. The shortcut may have been renamed by the user so I want to search through the shortcuts and find the shortcut that is pointed to the target exe that I am looking for.

How to find the shortcut that I want to work with. I think that I can then use ReplacefolderIcon to rename the shortcut.

Also, I will be doing this install on win 98\Me\2000, XP, 2003 server. Do I need to do things differently on any of the systems, in particular 98 and Me?


Lou Elston
07-22-2004, 03:07 PM
Through the recursive, (looping), use of GetFolderNameList and QueryProgItem.

ReplacefolderIcon can be used to rename the start\program shortcuts. When used on a Desktop shortcut it leaves the old shortcut until a reboot is done. Instead do a DeleteFolderIcon and then an AddFolderIcon.

ReplacefolderIcon does NOT on work on Shortcut folders, instead use RenameFile, (they are dirs, not shortcuts)