Solved

Windows 7 Group Policy created icons disappearing

Posted on 2012-12-28
3
824 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 500 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:JohnThePro
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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

First some basics on Windows 7 Backup.  It has 2 components one is a file based backup which is stored in .zip files each zip is split at around 200 Megabytes and there is the Image Backup which is as the name implies a total image of the partition …
OfficeMate Freezes on login or does not load after login credentials are input.
This Micro Tutorial will teach you how to change your appearance and customize your Windows 7 interface to your unique preference. This will be demonstrated using Windows 7 operating system.
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.

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

24 Experts available now in Live!

Get 1:1 Help Now