Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Windows 7 Group Policy created icons disappearing

Posted on 2012-12-28
3
Medium Priority
?
947 Views
Last Modified: 2013-01-15
I have a logon VB script that creates desktop icons on our users pc's for some commonly used links.  For whatever reason sometimes when they log on some of the icons are not there.  They log off and back on and they appear.  This seems to be only related to windows 7 machines.  Do you know of any issues with 7 that would cause this or is there something wrong with my script.  Here is a copy of my script.  THank you


'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 = "http://home"

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

'SET THE PROPERTIES FOR THE SHORTCUT
link.Description = "My Shortcut"
link.TargetPath = sys32Path
link.WindowStyle = 0
link.WorkingDirectory = desktopPath
link.IconLocation = "\\tch16\IT\ShortcutIcons\epic.ico"
link.Save

'CLEANUP OBJECTS
set shell = nothing
0
Comment
Question by:TriCountyIT
3 Comments
 
LVL 10

Accepted Solution

by:
George Khairallah earned 2000 total points
ID: 38727947
To directly answer your question, I'm not sure why the icons are disappearing. However, I do have a suggestion on doing this more efficiently.
Have you looked at the Shortcuts GPO preferences?  
I actually wrote a blog article not too long ago about this very task, you can check it out here:
http://blog.foreignkid.net/2012/10/working-preference-gpos/
0
 
LVL 7

Expert Comment

by:John Jennings
ID: 38779490
In reality, I'd recommend using the group policy to:

a) Create a new GPO that is filtered and effectively only for Windows 7 machines.
b) Setup Shortcuts preferences inside this new GPO.

The scripts will still function for your older workstations, however, with the new capabilities of Group Policy you're going to want to use the new stuff. Easier to manage and grow.
0
 

Author Closing Comment

by:TriCountyIT
ID: 38779959
I didnt know about this!! Thank you this is going to make my life a lot easier!!
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Assume you have an outside contractor who comes in seasonally or once a week to do some work in your office, but you only want to give him access to the programs and files he needs and keep all other documents and programs private. Can you do this o…
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
This Micro Tutorial will give you a introduction in two parts how to utilize Windows Live Movie Maker to its maximum capability. This will be demonstrated using Windows Live Movie Maker on Windows 7 operating system.
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

824 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