Solved

Pushing out desktop shortcuts using group policy

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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

In a recent article here at Experts Exchange (http://www.experts-exchange.com/articles/18880/PaperPort-14-in-Windows-10-A-First-Look.html), I discussed my nine-month sandbox testing of the Windows 10 Technical Preview, specifically with respect to r…
Windows 7 does not have the best desktop search built in. This is something Windows 7 users have struggled with. You type something in, and your search results don’t always match what you are looking for, or it doesn’t actually work at all. There ar…
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.

920 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

15 Experts available now in Live!

Get 1:1 Help Now