Click to See Complete Forum and Search --> : How to protect the desktop icons from being deleted???


January 5th, 2000, 02:52 PM
Hi, guys,

How can I detect by a program that a user is trying to delete an icon on the desktop, and forbid him doing so by giving him a warning,
and resuming the tesktop to the original.

Any answers would be appraciated!

Dave Straayer
January 9th, 2000, 12:58 PM
I think the icons you are concerned about are the result of shortcuts being in the windows\desktop directory (a little more complicated if you have multiple profiles on the computer). If the shortcut files have the read-only bit set, that might accomplish what you are trying to do. I'd just do it from dos with ATTRIB or CHMOD

Dave Straayer
Varatouch, Inc.

January 9th, 2000, 01:43 PM
But changing the attribute of a file does not protect it from being deleted. The system amy prompt you a messagebox and you may still delete it.

Can you suggest me better methods?