I never did post that script did I.
Anyway here it is, all it does is copy the icons from the netlogon share at machine startup to a folder called c:\settings\students removing the previous copies and overwriting with a fresh copy. If you then point the desktop and startmenu re-direction to the relevant local folders, it stops the machine making requests over the network every time the start menu is used, and also stops laptops loosing their startmenus and desktops when they loose their wireless signal. Any new icons added to the server appear on the machines when they are re-booted, and it works well.
Also as a bonus it reads the machines OU from active directory and copies different icons to the machines depending on what OU they are in, as well as copying a standard set of icons to all machines. I've been using this for a while now, and have had no real problems with it. It really is very simple.
Code:
on error resume next
Const OverWriteFiles = True
Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.DeleteFolder("C:\settings\students")
objFSO.CopyFolder "\\school\netlogon\stupol\Shortcuts\Basic icons" , "C:\settings\students" , OverWriteFiles
Set objWshNetwork = CreateObject("WScript.Network")
Set objAdsSystemInfo = CreateObject("adsysteminfo")
Set objComputerName = GetObject("LDAP://" & objAdsSystemInfo.ComputerName)
Set objOU = GetObject(objComputerName.Parent)
strOU = replace(objOU.Name,"OU=","")
Select Case strOU
Case "103"
objFSO.CopyFolder "\\school\netlogon\stupol\Shortcuts\103" , "C:\settings\students" , OverWriteFiles
Case "106"
objFSO.CopyFolder "\\school\netlogon\stupol\Shortcuts\106" , "C:\settings\students" , OverWriteFiles
End Select Just add more case statements for more OUs as necessary.
Hope that helps someone!
Mike