Rem: Updating Desktop Shortcuts

We're consolidating five file servers onto two new servers that connect to a System Area Network (SAN). Our users rely heavily on shortcuts. How can we automate the process of changing all the desktop shortcuts?

Making a specific recommendation is challenging without knowing your client platform (e.g., Win2K, NT) and whether your clients support a scripting environment other than the command processor. Thus, here are several options that you can explore:

  • Use WSH. The WshShell object exposes the CreateShortcut method that you can use to not only create shortcuts but also update them. To update an existing shortcut, simply pass its path to CreateShortcut. Because the shortcut already exists, CreateShortcut returns a reference to the existing shortcut rather than creating a new one. You can then use the returned reference to update the existing shortcut's TargetPath property or change any of the other properties that the WshShortcut object exposes (i.e., Arguments, Description, FullName, Hotkey, IconLocation, WindowStyle, and WorkingDirectory). After you've made your changes, call the WshShortcut object's Save method to write those changes to the shortcut. For more information about CreateShortcut, go to

  • Create new shortcuts (i.e., .lnk files). After you create the .lnk files, copy them to the users' Desktop folder. You can perform the copy operation as part of the users' logon script or simply push the files to the target clients remotely.

  • Use Windows Management Instrumentation. WMI exposes shortcuts through the Win32_ShortcutFile class. For information about this class, go to The Win32_ShortcutFile class is in the Operating system category.

  • Use the Win32::Shortcut module. To download this Perl module and obtain general usage instructions, go to
Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.