Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is there a way to make desktop icons undeletable???

Status
Not open for further replies.

mskennicutt

IS-IT--Management
Oct 18, 2002
59
US
I have a shortcut on all my users' desktops pointing to a network application. Every now and then Windows (XP Pro) for some reason can't see the target on the network and asks the user if they want to delete the icon since the target cannot be found (I guess the network connection gets momentarily lost). Most of the users are smart enough to actually read the message nefore clicking yes or no, BUT some of them just hit the Enter key to get it off their screens and since the default selection for this message is 'NO', they end up deleting the shortcut and I have to go recreate it for them!!

It is really aggrivating (the users as well as Windows). Can I either disable that message OR cause the icons to be undeletable? I have played with the ACL for the icon and can't seem to create a security configuration that works. I even tried in the advanced section of the ACL to "Deny" delete for the logged in user and they could still delete the icon by selecting and deleting it. Even if that worked though I don't know if it would stop Windows from deleting it if they answer 'YES' to the message.

ARGGG!!
 
Pardon me... the default selection for the Windows message is "YES", so when they hit Enter, it automatically deletes the shortcut icon in question.
 
Just had a play - see what you mean! After many attempts, this 'worked' for me (but don't know why, or if it will for you or if you really need to do all bits).

1. Changed shortcut attributes to RHS.
2. Gave Everyone read and execute access, deny write access, then on advanced bit, deny delete & delete subfolders.
3. Changed ownership (from Administrators group to an Administrative account - not Administrator).

When delete 'blah' now get 'Cannot delete blah:Access is denied. The source file may be in use'.

HTH
 
OK Thanks! Those shortcuts are tenatious little boogers aren't they?
 
Wolluf: RHS?


I am not sure you need both changing every shortcut and icon file individually.

First, disable the Desktop cleanup wizard. right-click the desktop, Arrange Icons, uncheck desktop cleanup.

Second, on the Desktop folder for All Users, and Individual users, right-click Properties, Security, Advanced, Deny Delete for Subfolders and files.
 
bcastner - read my post please - I just had a play with it, till I got the desired effect. Then I stopped and posted. As I said, don't know if all needed or not.
 
It was the hidden (H) attribute that I could not figure out. I did read the post, and had no problem with it, I just could not figure out the H.

Best.
 
Wollof,

Though ain't nobody going to delete a darn icon from the desktop soon with your approach!

<grin>
 
bcastner,
Thanks for the additional input, but just fyi, it isn't the cleanup wizard that is doing it (I had my run-ins with that lovely bit of code early on) but when a network shortcut can't see the target file at any given time, it brings up a window that says &quot;the target the shortcut refers to cannot be found. Would you like to delete the shortcut from the desktop?&quot;.

As far as I know the cleanup wizard is based on how often an icon is used.
 
mskennicut,

My thinking was that the cleanup wizard does periodic surveys of last access and availability, and it was triggering the prompt during a sweep. Something is triggering it, and the Wizard was my guess. As a practical matter it removes icons after a period of time, but as a functional matter it does sweeps to create a table of last access. Otherwise, what is triggering the prompt? You can have dead shortcuts all over your desktop and never get prompted with the cleanup wizard disabled.

On a related matter, have you considered reducing the likeliehood of the network share not being dropped? It surely cannot be a momentary thing that causes the icon issue. You might want to increase the autodisconnect value for your shares at the workstation.

Configuring LAN autodisconnect.

It is possible to configure a timeout for LAN connections (as with the Remote Access Service) after which idle time the connection will be closed, if you then try and use it the connection will be reconnected, this will be invisible to you but you will experience a slight delay.

By default this is 15 minutes however it can be changed by directly editing the registry:

Start the registry editor and move to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters

Double click autodisconnect

Set to decimal and set the number of minutes (from -1 to 4294967295). Try 500 minutes which should be enough
Click OK, and close the registry editor
Reboot the machine

I know in advance that a modification of a Wolluf recommendation is like gilding the lilly, but I hope I provided some additional thoughts as to how to approach the problem.

Best.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top