View Full Version : Delete multiple All Users desktop shortcuts?

01-08-2008, 01:03 PM

I need to add some code to an AMS 7.0 project that will delete several shortcuts that are in the 'All Users' Desktop, if they exist (and if not, it needs to continue on to the next part of the script).

I have tried both:

File.Delete(_DesktopFolderCommon.. "\\SDMT ILT Session.*", true, false, true, nil);


Shell.DeleteShortcut(Shell.GetFolder(_DesktopFolde rCommon), "SDMT ILT Session.*");

with no success - there are several more shortcuts that I need to delete as well.

Ideally, the script will work on both XP and Vista workstations, delete the shortcuts if they exist, then continue on to add new shortcuts (that part works).


01-08-2008, 01:28 PM
Try using File.Find. Have a look at this (http://www.indigorose.com/forums/showthread.php?t=17827&highlight=File.Find) post.

Hope that helps :)