Group Policy to add shortcut to desktops

Posted on 2006-04-06
Last Modified: 2012-05-05
How can I add a specified shortcut to all users's desktop via a group policy?
Question by:gopher_49
    LVL 12

    Assisted Solution

    You can either add some code to your logon script or deploy an MSi package using software installation with just the shortcut.  The MSI method does have the benefit of being able to rollback later on.

    The script should have something like this:

             set WshShell = WScript.CreateObject("WScript.Shell")
             strDesktop = WshShell.SpecialFolders("Desktop")
             set oShellLink = WshShell.CreateShortcut(strDesktop & "\Network Share.lnk")
             oShellLink.TargetPath = "\\server\share"
             oShellLink.WindowStyle = 1
             oShellLink.IconLocation = "explorer.exe, 0"
             oShellLink.Description = "Network Share"
             oShellLink.WorkingDirectory = "\\share\server"
    LVL 12

    Expert Comment

    LVL 21

    Expert Comment

    You can also just place the shortcut on the network somewhere and add these line to your logon script

    If Not Exist "C:\Documents and Settings\All Users\Desktop\Myshortcut.lnk"
    copy \\someserver\someshare\myshortcut.lnk "c:\Documents and settings\All users\Desktop"
    LVL 21

    Accepted Solution

    bah, getting command mixed up with VBS...that should all be on one line like

    If Not Exist "C:\Documents and Settings\All Users\Desktop\Myshortcut.lnk" copy \\someserver\someshare\myshortcut.lnk "c:\Documents and settings\All users\Desktop"

    Author Comment

    Both of you had great solutions.  Mcsween's was the easiest so I went that route.

    LVL 12

    Expert Comment

    Thanks, glad we couldprovide the info needed =)

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Organizations create, modify, and maintain huge amounts of data to help their businesses earn money and generally function.  Typically every network user within an organization has a bit of disk space to store in process items and personal files.   …
    ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

    728 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