• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 592
  • Last Modified:

Internet Shortcut in Script Won't Save Icon

I have a script that pushes various icons for executables to our employees' desktops.  Normally I change the icon of the shortcut to the path of an icon that everyone has access to.  This works fine.

Now, I am trying to add an Internet Shortcut but the icon remains blank.  When I try to change the icon on the server, it changes but the path of the icon will return to the default Windows path (%systemroot%\system32\SHELL32.dll).

Why won't it keep the icon?

Working icons... Script says...
AddIcon "\\server\Shortcuts\", "Shortcut.lnk", ""
I right-click the shortcut and Change Icon to \\server\Shortcuts\ShortcutIcon.ico

The one I'm having problems with...
AddIcon "\\server\Shortcuts\", "URLShortcut.url", ""
I right-click the URL and Change Icon and it always returns to %systemroot%\system32\SHELL32.dll)
  • 2
1 Solution
does the icon issue happen after the shortcut is deployed or while it's sitting on the \shortcuts\ folder?
tjking45Author Commented:
The issue is a little different than first described.

When it is sitting in the shortcuts folder, the icon itself updates fine, yet when I click on the Change Icon button, the path shows the default system location.  The correct icon remains.  

I have found that if I wait long enough, the workstation will eventually pick up the correct icon if they are running XP.  On the Windows 7 machines, it is a crapshoot whether or not the correct icon will show up.

It's hard to describe what is going on because nothing is really consistent.
might this be of any help:link

I remember trying to accomplish something like this a few years ago.  I think I used a script that would let me change the path of the shortcut location.  I'll if I have that saved somewhere tomorrow at work.
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

Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

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