March 29th, 2011

Although the default icon for a shortcut is the icon of the target, you can override that

A customer reported that a shortcut they deployed to their employees’ desktops was triggering unwanted server traffic.

My customer deploys a shortcut on %ALLUSERSPROFILE%\Desktop, and this shortcut points to an EXE file on a remote server. Once a local user logs on, the computer will try logging onto the remote computer to query information and generate a login failure alert on the server.

Is there any way to stop Explorer from querying the shortcut information?

Fortunately, the customer provided context for the question, because the question the customer is asking doesn’t actually match the scenario. The customer doesn’t want to stop Explorer from querying the shortcut information; the customer just wants to stop Explorer from contacting the server to get the icon.

The default icon for a shortcut is the icon of the target, and in order to get that icon, Explorer needs to contact the target. But you can override that default. Programmatically, you call IShellLink::SetIconLocation; interactively, you view the shortcut’s properties and click Change Icon…. In either case, set it to an icon that doesn’t reside on the server. Save the changes and deploy the modified shortcut.

Author

Raymond has been involved in the evolution of Windows for more than 30 years. In 2003, he began a Web site known as The Old New Thing which has grown in popularity far beyond his wildest imagination, a development which still gives him the heebie-jeebies. The Web site spawned a book, coincidentally also titled The Old New Thing (Addison Wesley 2007). He occasionally appears on the Windows Dev Docs Twitter account to tell stories which convey no useful information.

0 comments

Discussion are closed.