• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1908
  • 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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

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