its a reg edit, search the forum.
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.
its a reg edit, search the forum.
Take a look at this, I guess it could be added as logon script.
Thats just the thing Ian thanks, anyone any idea how to make it into a script?
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.
Reg add or Reg Import should do it - or failing that an AutoIT RegWrite command......
Or even better
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
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!
Mike.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*******
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.
ok so how do i do it on a batch file please, 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:sorry but im not a script expert
reg delete /?
This will give you a breakdown of how to delete the menu order key as stated on the link provided by Iain.
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
Indeed yes - you missed out the /f though.....
And it needs to be all on one line possibly...................
ok so were abouts does the /f go please? Like this
REG DELETE HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Explorer\MenuOrder /f
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.
There are currently 1 users browsing this thread. (0 members and 1 guests)