Solved

Windows 7 Group Policy created icons disappearing

Posted on 2012-12-28
3
861 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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

When you start your Windows 10 PC and got an "Operating system not found" error or just saw  "Auto repair for startup" or a blinking cursor with black screen. A loop for Auto repair will start but fix nothing.  You will be panic as there are no back…
You may have a outside contractor who comes in once a week or seasonal to do some work in your office but you only want to give him access to the programs and files he needs and keep privet all other documents and programs, can you do this on a loca…
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…

786 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