• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1846
  • Last Modified:

Delete a Desktop Shortcut/Icon Using Delphi Code

I need to be able to find and delete a shortcut on the Windows (XP) desktop with respect to the executable it is pointing to.  I am working in Borland Development Studio, using Delphi 2006.
0
Computrus-User
Asked:
Computrus-User
  • 2
1 Solution
 
A. Cristian CsikiSenior System AdministratorCommented:
Hi.
List all shortcuts, and check each one until you find the desired if the the pointed application has a shortcut delete it.
http://delphi.about.com/od/windowsshellapi/l/aa072704a.htm

To delete shortcut try like this:
deletefile(filename);

Good luck,
cheers
0
 
Computrus-UserAuthor Commented:
nodramas,
Thanks!  That's exactly what I was looking for.

-Bert
0
 
A. Cristian CsikiSenior System AdministratorCommented:
Glad I could point you in wright direction. ;)
Best wishes.

0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now