pritchardavid Posted January 15, 2010 Posted January 15, 2010 Having been having trouble with Windows 7 Start Menu Redirection, I even created a new policy (No other ones running) justt with Desktop and start menu redirection. Works in XP fine but soon has I use Windows 7 and soon has I try to use shorcuts that are redirected from the server, the programe does not start up. Its fine lanching shorcuts that are on the actual hard drive. So need a script made Would like one that looks at the computer name ie ICT1-PC* ICT2-PC* COMM-PC* Star means it does anything after that, gussing you know that Once it finds the computer name it copys a set of shorcuts over, for example, ICT would have a set of shorcuts called ICT Start Menu. These shorcuts would be different than the COMM Room, has it has different software on these computers Thanks in advance
ChrisH Posted January 15, 2010 Posted January 15, 2010 This code probably wont work straight off as I just pasted a few of my scripts together and I am in a rush. It assumes your different startmenus are stored like: \\server\share\apps\StartMenus\ict1 \\server\share\apps\StartMenus\ict2 \\server\share\apps\StartMenus\comm It grabs the first 4 letters of the comp name to identify. There is stuff from other scripts that is not needed but it should be a start. ' Begin Variable declaration Set ObjShell = CreateObject("Shell.Application") Set WshShell = WScript.CreateObject("WScript.Shell") Set WshNetwork = CreateObject("WScript.Network") Set ObjFSO = CreateObject("Scripting.FileSystemObject") 'Begin Constant Declaration Const Robo_Options = "/e /zb /copyall /r:3 /w:1 /purge" Const Start_Menu_Source = "\\server\share\apps\StartMenus\" Const Start_Menu_Destination = "C:\StartMenus" 'Begin Object Declaration Set ObjShell = CreateObject("WScript.Shell") StrComputerName = Left(LCase(WshNetwork.ComputerName),4) Select Case (Left(StrComputerName, 4)) Case "ict1" strStartMenuPath = Start_Menu_Source & "ict1" Case "ict2" strStartMenuPath = Start_Menu_Source & "ict2" Case "comm" strStartMenuPath = Start_Menu_Source & "comm" Case Else ' WScript.Echo "No default printers added" End Select 'End printer Case Statements 'If the folder StartMenus Exists then Delete it If objFSO.FolderExists(Start_Menu_Destination) Then 'objFSO.DeleteFolder(Start_Menu_Destination) End IF 'Copy the folder StartMenus from the network share objFSO.CopyFolder strStartMenuPath,Start_Menu_Destination In a GPO redirect start menus to c:\StartMenus
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now