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

Group Policy to add shortcut to desktops

How can I add a specified shortcut to all users's desktop via a group policy?
0
gopher_49
Asked:
gopher_49
  • 3
  • 2
2 Solutions
 
MazaraatCommented:
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"
         oShellLink.Save
0
 
mcsweenSr. Network AdministratorCommented:
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"
0
Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

 
mcsweenSr. Network AdministratorCommented:
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"
0
 
gopher_49Author Commented:
Both of you had great solutions.  Mcsween's was the easiest so I went that route.

thanks.
0
 
MazaraatCommented:
Thanks, glad we couldprovide the info needed =)
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

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