FN-GM Posted October 11, 2007 Posted October 11, 2007 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
Iain Posted October 11, 2007 Posted October 11, 2007 Hi, Take a look at this, I guess it could be added as logon script. Iain.
FN-GM Posted October 11, 2007 Author Posted October 11, 2007 Thats just the thing Ian thanks, anyone any idea how to make it into a script?
ChrisH Posted October 11, 2007 Posted October 11, 2007 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.
mattx Posted October 11, 2007 Posted October 11, 2007 Reg add or Reg Import should do it - or failing that an AutoIT RegWrite command......
Guest Guest Posted October 11, 2007 Posted October 11, 2007 Or even better http://www.desktopstandard.com/PolicyMakerRegistryExtension.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
maniac Posted October 11, 2007 Posted October 11, 2007 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! '*******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.
mattx Posted October 11, 2007 Posted October 11, 2007 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.
FN-GM Posted October 11, 2007 Author Posted October 11, 2007 ok so how do i do it on a batch file please, sorry but im not a script expert
mattx Posted October 11, 2007 Posted October 11, 2007 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.
FN-GM Posted October 11, 2007 Author Posted October 11, 2007 Ok please bare with me on this, would i put this in the batch file? REG DELETE HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrder
mattx Posted October 11, 2007 Posted October 11, 2007 Indeed yes - you missed out the /f though..... And it needs to be all on one line possibly...................
FN-GM Posted October 11, 2007 Author Posted October 11, 2007 ok so were abouts does the /f go please? Like this Thanks REG DELETE HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrder /f
maniac Posted October 11, 2007 Posted October 11, 2007 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.
mattx Posted October 11, 2007 Posted October 11, 2007 Yep, the /f goes at the end. Visit: http://www.robvanderwoude.com/ For some tips etc. But like Maniac says, you will end up prefering a scripting language of your choice and one you feel more comfortable with. For me its AutoIT & good old fashioned batch files. Maniac likes VB [ maybe thats why he is called Maniac.... ;-) ] only joking Mike.....
mattx Posted October 12, 2007 Posted October 12, 2007 Worked for me, did you log off and back on again or re-boot ? Also did you work your way into regedit to check that the key was actually deleted ? [ Remember it gets re-created after the logon / reboot ]
Iain Posted October 12, 2007 Posted October 12, 2007 Maybe try running it as a logoff script, so the next time a user logs on the key is recreated and the menu order is reset. Iain.
originofsymmetry Posted October 13, 2007 Posted October 13, 2007 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. If you could put up a copy I'd be forever grateful, sick of having to re-order it on each machine. Though I have seen on my Vista box that as soon as you add anything to the start menu, it organises it by name. If that is a registry setting then that could probably be applied to great effect in this scenario.
maniac Posted October 13, 2007 Posted October 13, 2007 it's on the previous page. I personally don't use this code so I don't know if it works in practice, but it does remove the start menu order registry key which, when tested, re-orders the start menu by name on my home desktop, so there's no reason it shouldn't work. Personally I use a mandatory profile for students on the network which has had this registry key removed, so the start menu is always ordered by name by default. Mike.
FN-GM Posted October 17, 2007 Author Posted October 17, 2007 Yes it does work, sorry. Thanks for your help
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