Solved

Pushing out desktop shortcuts using group policy

Posted on 2010-09-06
5
1,464 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 76

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

Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

Join & Write a Comment

Suggested Solutions

Sometimes a user will call me frantically, explaining that something has gone wrong and they have tried everything (read - they have messed it up more and now need someone to clean up) and it still does no good, can I help them?!  Usually the standa…
A quick step-by-step overview of installing and configuring Carbonite Server Backup.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

760 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

22 Experts available now in Live!

Get 1:1 Help Now