
Originally Posted by
rob_f
As we weren't updating the start menu that often, there wasn't a need for it to be always checked on the server, so i wrote a script to do a sync of the menu on startup to local disk, then point the redirect at that. . . . .
I had exactly the same setup at a previous school, it worked like a charm and also stopped the missing startmenu and desktop problems you can get on wireless laptops using a redirected startmenu when the wireless signal drops. My simple script deleted the existing local copy and re-copied the start menu from the server everytime the machine started up. As it's only a handful of shortcuts it really didn't take too long to do, and extra time taken at startup is out weighed by the benefits in my opinion.
This script also examines the OU the computer account is in, and copies over additional icons for each set of workstations if you want it to, as defined by the case statement. That means you no longer have dead links on your start menu for programs only installed in a certain area of the school. Hopefully the rest of it is fairly self explanatory.
Code:
on error resume next
Const OverWriteFiles = True
Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.DeleteFolder("C:\settings\startmenu")
objFSO.CopyFolder "\\DOMAIN\netlogon\students\Shortcuts\Basicicons" , "C:\settings\menu" , 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 "room 1"
objFSO.CopyFolder "\\school\netlogon\students\Shortcuts\rm1" , "C:\settings\menu" , OverWriteFiles
Case "Room 3"
objFSO.CopyFolder "\\school\netlogon\students\Shortcuts\rm3" , "C:\settings\menu" , OverWriteFiles
Case "Room 10 laptops"
objFSO.CopyFolder "\\school\netlogon\students\Shortcuts\rm10LT" , "C:\settings\menu" , OverWriteFiles
End Select You can then point your group policy redirect at c:\settings\menu and the machine will use the local start menu from that location
Mike.