Questions

Put an icon on all users desktop in domain

+
0 Votes
Locked

Put an icon on all users desktop in domain

albert001
I created a script to put a shortcut on everyone's desktop like this:

Set objShell = CreateObject("Wscript.Shell")
strDesktop = objShell.SpecialFolders("Desktop")

Set objShortcut = objShell.CreateShortcut(strDesktop & "\Helpdesk.lnk")
objShortcut.TargetPath = "http://192.168.1.131/helpdesk"

objShortcut.Description = "Creates desktop icon for helpdesk"
objShortcut.WorkingDirectory = strDesktop

objShortcut.SetIconLocation "G:\spiceworks.ico", 0

objShortcut.Save


The problem is that it only puts the icon there on user profiles that have been created since I set the GPO. It is Windows Server 2003 SBS and all the desktops are XP. We are not using roaming profiles. Also the icon looks like a broken link, how do I get it to use the .ico that I want?
+
0 Votes
LarryD4
Collapse -

Might be easier to just write the script to copy the spiceworks.ico file from a share on a server to each PC's "All Users\Desktop" folder as they sign in.

You may want to include a check to see if its already their.

+
0 Votes
neilb@uk
Collapse -

Write it to check to see if the shortcut is already there and exit if that's the case.

This is the MS Scripting Guy's method to change an icon and it's the method that I use. Looks much the same as yours.

Const DESKTOP = &H10&

Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.NameSpace(DESKTOP)

Set objFolderItem = objFolder.ParseName("Shortcut.lnk")
Set objShortcut = objFolderItem.GetLink

objShortcut.SetIconLocation "C:\Windows\System32\SHELL32.dll", 13
objShortcut.Save

Neil :)