+ Post New Thread
Page 1 of 2 12 LastLast
Results 1 to 15 of 22
Scripts Thread, Script to sort by name on start menu in Coding and Web Development; Hi guys I was just wondering is there a script that will sort the shortcuts on the start menu by ...
  1. #1

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    15,773
    Thank Post
    865
    Thanked 1,663 Times in 1,448 Posts
    Blog Entries
    11
    Rep Power
    442

    Script to sort by name on start menu

    Hi guys

    I was just wondering is there a script that will sort the shortcuts on the start menu by the name so they are all nice and tidy when the user logs on and they are not all over the place. When we have different software on different machines if I user logs on the a machine and software is on the start menu that wasn’t there before it puts it to the bottom.

    Thanks

  2. #2


    Join Date
    Oct 2006
    Posts
    3,411
    Thank Post
    184
    Thanked 356 Times in 285 Posts
    Rep Power
    148

    Re: Script so sort by name on start menu

    its a reg edit, search the forum.

  3. #3
    Iain's Avatar
    Join Date
    Oct 2006
    Location
    Warwickshire
    Posts
    185
    Thank Post
    28
    Thanked 92 Times in 52 Posts
    Rep Power
    31

    Re: Script so sort by name on start menu

    Hi,

    Take a look at this, I guess it could be added as logon script.

    Iain.

  4. #4

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    15,773
    Thank Post
    865
    Thanked 1,663 Times in 1,448 Posts
    Blog Entries
    11
    Rep Power
    442

    Re: Script so sort by name on start menu

    Thats just the thing Ian thanks, anyone any idea how to make it into a script?

  5. #5
    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: Script so sort by name on start menu

    Time to learn a bit of scripting me thinks. I will give you some hints though:
    It will be a logon script and you should look at the "reg" DOS command to add to a batch script or you can do the same in VB script but that will be 2 or 3 lines.

  6. #6

    mattx's Avatar
    Join Date
    Jan 2007
    Posts
    9,236
    Thank Post
    1,057
    Thanked 1,067 Times in 624 Posts
    Rep Power
    740

    Re: Script so sort by name on start menu

    Reg add or Reg Import should do it - or failing that an AutoIT RegWrite command......

  7. #7


    Join Date
    Oct 2006
    Posts
    3,411
    Thank Post
    184
    Thanked 356 Times in 285 Posts
    Rep Power
    148

    Re: Script so sort by name on start menu

    Or even better

    http://www.desktopstandard.com/Polic...Extension.aspx

    Realy is the dogs. The number of regedits applied by scripts and MSIs was getting stpuid. The above app will make any future reg edits a breeze

  8. #8

    maniac's Avatar
    Join Date
    Feb 2007
    Location
    Kent
    Posts
    3,037
    Thank Post
    209
    Thanked 425 Times in 306 Posts
    Rep Power
    144

    Re: Script so sort by name on start menu

    This script will achieve that, it deletes the 'menuorder' string in the registry. I found the basics on a scripting site, but it needed a slight modification to make it work for this. I've no idea how it will perform in a networked environment, it works reliably on my PC at home.

    Copy and paste into notepad, and save as a .VBS file. This is fairly un-tested so use it at your own risk! Modifying registry entries can cause problems, and this script COULD wipe your entire registry if you used it wrong! don't say you wern't warned!

    Code:
    '*******Begin script********* 
    On Error Resume Next 
    
    Const HKCU = &H80000001 
    
    strComputer = "." 
    strKeyPath = "Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrder" 
    
    Set objRegistry = GetObject("winmgmts:\\" & strComputer & "\root\default:StdRegProv") 
    
    DeleteSubkeys HKCU, strKeypath 
    
    Sub DeleteSubkeys(HKCU, strKeyPath) 
    objRegistry.EnumKey HKCU, strKeyPath, arrSubkeys 
    If IsArray(arrSubkeys) Then 
    For Each strSubkey In arrSubkeys 
    DeleteSubkeys HKCU, strKeyPath & "\" & strSubkey 
    Next 
    End If 
    objRegistry.DeleteKey HKCU, strKeyPath 
    End Sub 
    '*******End Script*******
    Mike.

  9. #9

    mattx's Avatar
    Join Date
    Jan 2007
    Posts
    9,236
    Thank Post
    1,057
    Thanked 1,067 Times in 624 Posts
    Rep Power
    740

    Re: Script so sort by name on start menu

    Good lord, all that for a simple registry entry !!
    This is one of the reasons I avoid any VBS scripting..... 15 lines of code when a batch or AutoIT script could do it in two to three lines.

  10. #10

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    15,773
    Thank Post
    865
    Thanked 1,663 Times in 1,448 Posts
    Blog Entries
    11
    Rep Power
    442

    Re: Script so sort by name on start menu

    ok so how do i do it on a batch file please, sorry but im not a script expert

  11. #11

    mattx's Avatar
    Join Date
    Jan 2007
    Posts
    9,236
    Thank Post
    1,057
    Thanked 1,067 Times in 624 Posts
    Rep Power
    740

    Re: Script so sort by name on start menu

    sorry but im not a script expert
    You are a young chappy, now is a good time to learn - open up a command prompt and type in:

    reg delete /?

    This will give you a breakdown of how to delete the menu order key as stated on the link provided by Iain.

  12. #12

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    15,773
    Thank Post
    865
    Thanked 1,663 Times in 1,448 Posts
    Blog Entries
    11
    Rep Power
    442

    Re: Script so sort by name on start menu

    Ok please bare with me on this, would i put this in the batch file?

    REG DELETE HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Explorer\MenuOrder

  13. #13

    mattx's Avatar
    Join Date
    Jan 2007
    Posts
    9,236
    Thank Post
    1,057
    Thanked 1,067 Times in 624 Posts
    Rep Power
    740

    Re: Script so sort by name on start menu

    Indeed yes - you missed out the /f though.....
    And it needs to be all on one line possibly...................

  14. #14

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    15,773
    Thank Post
    865
    Thanked 1,663 Times in 1,448 Posts
    Blog Entries
    11
    Rep Power
    442

    Re: Script so sort by name on start menu

    ok so were abouts does the /f go please? Like this

    Thanks

    REG DELETE HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Explorer\MenuOrder /f

  15. #15

    maniac's Avatar
    Join Date
    Feb 2007
    Location
    Kent
    Posts
    3,037
    Thank Post
    209
    Thanked 425 Times in 306 Posts
    Rep Power
    144

    Re: Script so sort by name on start menu

    I prefer VB script, as it executes faster in my experience, plus all my other scripts are in VB script so it makes sense to use VB script for everything ,as I can bung it all in one script. I also find VB script more flexible. Personal preference type of affair really.

    Mike.

SHARE:
+ Post New Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. Start Menu redirection help!
    By wesleyw in forum Windows
    Replies: 5
    Last Post: 26th February 2008, 02:04 PM
  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. XP Start Menu Problem
    By Gatt in forum Windows
    Replies: 1
    Last Post: 12th July 2007, 08:30 AM
  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
  •