Script for Shortcut Icon Deletion from the Desktop
During Windows client preparation, most of the corporate programs I work with create a shortcut icon on the user's desktop.
I prefer to maintain a computer clean of programs used infrequently. For example, Adobe Reader and other viewers normally are executed from a folder or e-mail attachement, not by launching the program from a shortcut on the desktop.
For this reason in my installation process I have a list of shortcut icons to remove from the desktop.
The traditional way to remove a shortcut icon is to drag it to the Recycle Bin or press the Delete key.
But I've found using a process is the best way to automatically remove these pesky icons for you.
In this example I decided to remove the PDFCreator shortcut. It is normally created during installation in the All User Profile folder.
In the DS console is created a job called "Remove desktop icon" with a simple script as follows:
DEL /Q "%ALLUSERSPROFILE%\Desktop\PDFCreator.LNK" > NUL
In this example the icon PDFCreator is removed in a quiet mode from All Users profile. It takes just seconds and the deletion is done.

The Endpoint Management Community Blog is the perfect place to share short, timely insights including product tips, news and other information relevant to the Endpoint Management community. Any authenticated Connect member can contribute to this blog.
Comments
thx
Thanks riva!
Interesting tip.
Interesting tip.
Would you like to reply?
Login or Register to post your comment.