Solved

Pushing out desktop shortcuts using group policy

Posted on 2010-09-06
5
1,471 Views
Last Modified: 2012-05-10
I’m looking for a way to push out a number of desktop shortcuts of local URL’s onto users desktops across a domain.  

All our clients are XP SP3.  Can someone define a simple BAT file that would accomplish this and suggest a way to apply this to group policy for all users.
0
Comment
Question by:DHPBilcare
  • 3
5 Comments
 
LVL 3

Accepted Solution

by:
dontseme earned 500 total points
ID: 33613237
I whould not use a bat file I would use VBScript. Like this one.  Then add it to you group ploicy
'##############################################################
'# CREATESHORTCUT_WSH.VBS
'# CREATES A SHORTCUT ON THE USERS DESKTOP TO A SPECIFIED FILE
'#
'# USES: WINDOWS SCRIPT HOST
'# LANGUAGE: VISUAL BASIC SCRIPTING EDITION
'##############################################################

'FORCE EXPLICIT VARIABLE DECLARATION
option explicit

'STEP OVER ERRORS FOR CUSTOM ERROR REPORTING
on error resume next

'DECLARE VARIABLES
dim shell, desktopPath, link, sys32Path

'INSTANTIATE THE WINDOWS SCRIPT HOST SHELL OBJECT
Set shell = WScript.CreateObject("WScript.shell")

'SET THE PATH TO THE WINDOWS DESKTOP FOLDER & MY DOCUMENTS FOLDER
desktopPath = shell.SpecialFolders("Desktop")
sys32Path = "%SystemRoot%\system32"

'CREATE A SHORTCUT ON THE USER'S DESKTOP
Set link = shell.CreateShortcut(desktopPath & "\your.url")

'SET THE PROPERTIES FOR THE SHORTCUT
link.Description = "your shortcut here"
link.TargetPath = "http://????/"
link.WindowStyle = 3
link.WorkingDirectory = desktopPath
link.Save

'CLEANUP OBJECTS
set shell = nothing

'LET THE USER KNOW IF THERE WAS AN ERROR AND WHAT IT WAS
'OTHERWISE CONFIRM SHORCUT CREATION
'if err.number <> 0 then
'      msgbox "There was an error creating your shortcut." & vbCrLf & err.description & vbCrLf & err.source, vbOKOnly-vbExclamation, "Shortcut Builder"
'else
'      msgBox "Your new shortcut has been created!" & vbCrLf & "Please check your Windows Desktop.", vbOKOnly-vbInformation, "Shortcut Builder"
'end if
0
 

Author Comment

by:DHPBilcare
ID: 33613297
Thanks for that.

How would I apply this to group policy on a Windows 2003 Server?
0
 
LVL 3

Expert Comment

by:dontseme
ID: 33613359
Yes if you want it to go to all I would apply it in the default domain policy. Under Local computer policy/Computer configuration/windows setting/scripts/startup
0
 
LVL 77

Expert Comment

by:arnold
ID: 33614110
I would add the shortcuts to the c:\documents and settings\all users\desktop.
Make sure the settings on the files is to inherit from parent.

The simple thing would be to create the shortcut and then copy them.

You could use the advice from dontseme in a startup script to copy data from a shared location to the local c:\documents and settings\all users\dektop\
0
 
LVL 3

Expert Comment

by:dontseme
ID: 33614383
If you did the vbs script you could either add it to the computer or user container in Group Policy. This just ensures that if you ever reimage or bring new computers on the domain they automatically get it. I use this script to push 4 urls to the desktop or 2 (different script) by putting it in the user configuration depending on who logs in. I also have various drives mapped by user this way. Just copy the vbs to a txt file and edit to suit your needs. Then save it to your DC and edit the group policy to apply the script. To me it is alot easier to do it this way for the 400+ computers in my network. Hope this helps.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I've always wanted to allow a user to have a printer no matter where they login. The steps below will show you how to achieve just that. In this Article I'll show how to deploy printers automatically with group policy and then using security fil…
On July 14th 2015, Windows Server 2003 will become End of Support, leaving hundreds of thousands of servers around the world that still run this 12 year old operating system vulnerable and potentially out of compliance in many organisations around t…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

856 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