Delete multiple All Users desktop shortcuts?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • doc13x
    Indigo Rose Customer
    • May 2005
    • 41

    Delete multiple All Users desktop shortcuts?

    Hello,

    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);

    and

    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).

    Help?
  • longedge
    Indigo Rose Customer
    • Aug 2003
    • 2498

    #2
    Try using File.Find. Have a look at this post.

    Hope that helps

    Comment

    Working...
    X