+ Post New Thread
Results 1 to 5 of 5
Windows Thread, Start Menu Script Problem in Technical; I have been trying to write a script to copy a startmenu to the local drive of a machine from ...
  1. #1

    Join Date
    Jun 2006
    Location
    Wigan
    Posts
    27
    Thank Post
    1
    Thanked 2 Times in 2 Posts
    Rep Power
    17

    Start Menu Script Problem

    I have been trying to write a script to copy a startmenu to the local drive of a machine from a network share but i need to do it on a room basis.

    For example

    If computername begins with A16 then copy a certain start menu from the server

    Hop someone can help

    Phil

  2. #2

    DaveP's Avatar
    Join Date
    Oct 2006
    Location
    Can't talk now: The mother-ship is calling!
    Posts
    8,703
    Thank Post
    351
    Thanked 1,268 Times in 866 Posts
    Blog Entries
    4
    Rep Power
    1124

    Re: Start Menu Script Problem

    I am not 100% sure this will work, as I am just about to try something similar myself, but why not use a GPO in Active Directory?

    If the computer A16???? is in the A16 OU, for example, edit the GPO for that OU (or create on if it is not already there) go to User Configuration/Windows Settings/Folder Redirection/Start Menu. Right click the Start Menu folder icon.

    Select setting: 'Basic - Redirect everyone's folder to the same location.

    Target folder location: 'Redirect to the following location'

    Root path: Specify a path where the items can be copied from (e.g: \\servername.domain.local\SYSVOL\Common Folders\Start Menus\My A16 Start Menu Items

    It should work. I am successfully redirecting other items this way. If it doesn't it can easily be undone.

  3. #3

    Join Date
    Jun 2006
    Location
    Wigan
    Posts
    27
    Thank Post
    1
    Thanked 2 Times in 2 Posts
    Rep Power
    17

    Re: Start Menu Script Problem

    The reason that i want to redirect the start menu to a local folder on the machine is so that it runs quicker becuase at the moment it takes a while for the start menu to become useable

  4. #4
    ChrisH's Avatar
    Join Date
    Jun 2005
    Location
    East Lancs
    Posts
    4,996
    Thank Post
    120
    Thanked 280 Times in 258 Posts
    Rep Power
    106

    Re: Start Menu Script Problem

    You want a start up script to copy the start menus to the local machine. You then want to ise the GPO as suggested above to redirect everybodys start menus to something like c:\startmenus\students.

  5. #5

    mac_shinobi's Avatar
    Join Date
    Aug 2005
    Posts
    9,677
    Thank Post
    3,209
    Thanked 1,030 Times in 955 Posts
    Rep Power
    361

    Re: Start Menu Script Problem

    ' ------------------------------------------
    ' Retrieve OU that the computer resides in -
    ' ------------------------------------------

    dim filesys
    set filesys=CreateObject("Scripting.FileSystemObject")

    Dim adstring
    adstring = CreateObject("ADSystemInfo").ComputerName

    Dim oubits
    oubits = split(adstring, ",")

    Dim ou
    ou = split(oubits(1), "=")

    Select Case ou(1)

    Case "ROOM_NAME"

    If filesys.FolderExists("c:\sourcefolder\website") Then
    filesys.CopyFolder "c:\sourcefolder\website", "c:\destfolder\"
    End If

    End Select

    '-----------------


    obviously if you want more or have more rooms, just create more case statements with the relevant code chunks , I just did one above as an example and obviously insert the room name inside the quotes of the case.

    You will have to alter the directory paths for the source and destination of where the start menu folder is. If you just want to copy a file then that will be different.

    Hope this helps

    *NOTE* --> However I do recomend you listen to the other suggestion with regards to using GPO and not a vbscript

SHARE:
+ Post New Thread

Similar Threads

  1. Start menu redirection
    By Andi in forum Network and Classroom Management
    Replies: 28
    Last Post: 5th December 2007, 01:48 PM
  2. Start Menu Issue in XP
    By rixi in forum Windows
    Replies: 1
    Last Post: 18th October 2007, 04:48 PM
  3. Script to sort by name on start menu
    By FN-GM in forum Scripts
    Replies: 21
    Last Post: 17th October 2007, 05:33 PM
  4. Custom Start menu problem
    By iSteve in forum Windows
    Replies: 2
    Last Post: 9th August 2007, 11:51 AM
  5. XP Start Menu Problem
    By Gatt in forum Windows
    Replies: 1
    Last Post: 12th July 2007, 08:30 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
  •