Internet Shortcut in Script Won't Save Icon

Posted on 2011-04-22
Last Modified: 2012-05-11
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)
Question by:tjking45

    Expert Comment

    does the icon issue happen after the shortcut is deployed or while it's sitting on the \shortcuts\ folder?

    Author Comment

    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.

    Accepted Solution

    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.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Suggested Solutions

    by Batuhan Cetin Within the dynamic life of an IT administrator, we hold many information in our minds like user names, passwords, IDs, phone numbers, incomes, service tags, bills and the order from our wives to buy milk when coming back to home.…
    Scenerio: You have a server running Server 2003 and have applied a retail pack of Terminal Server Licenses.  You want to change servers or your server has crashed and you need to reapply the Terminal Server Licenses. When you enter the 16-digit lic…
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now