+ Post New Thread
Results 1 to 2 of 2
Scripts Thread, Start Menu Script Needed in Coding and Web Development; Having been having trouble with Windows 7 Start Menu Redirection, I even created a new policy (No other ones running) ...
  1. #1
    pritchardavid's Avatar
    Join Date
    Sep 2009
    Location
    South Ockendon, Thurrock, United Kingdom
    Posts
    932
    Thank Post
    18
    Thanked 64 Times in 58 Posts
    Rep Power
    25

    Start Menu Script Needed

    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

  2. #2
    ChrisH's Avatar
    Join Date
    Jun 2005
    Location
    East Lancs
    Posts
    5,009
    Thank Post
    120
    Thanked 282 Times in 260 Posts
    Rep Power
    108
    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.

    Code:
    ' 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

SHARE:
+ Post New Thread

Similar Threads

  1. script needed to kick start WSUS clients
    By projector1 in forum Scripts
    Replies: 3
    Last Post: 12th March 2008, 09:55 AM
  2. Start menu redirection
    By Andi in forum Network and Classroom Management
    Replies: 28
    Last Post: 5th December 2007, 01:48 PM
  3. Start Menu Issue in XP
    By rixi in forum Windows
    Replies: 1
    Last Post: 18th October 2007, 04:48 PM
  4. Script to sort by name on start menu
    By FN-GM in forum Scripts
    Replies: 21
    Last Post: 17th October 2007, 05:33 PM
  5. Start Menu Script Problem
    By phillipmillward in forum Windows
    Replies: 4
    Last Post: 23rd November 2006, 08:50 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •