Shark007 Posted January 7, 2005 Posted January 7, 2005 Thru this forum, ZachDoty has a link to his/her own site.at that site, i find instruction to sort the start menu alphabetically thru windows.Make Start Menu Organize Alphabetically For Windows XP (not tested on other versions) Open regedit (Start > Run > Type regedit > Click "OK") Navigate to HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrder Right click "MenuOrder" in the left pane Click "Permissions..." Click the "Advanced" button Uncheck the checkbox titled "Inherit from parent the permission entries that apply to child objects. Include these with entries explicitly defined here" A security dialog box will open, click "Copy" and you'll be taken back to the "Advanced Security Settings" for "MenuOrder" Click "OK" and you'll return to the Permissions for MenuOrder window Uncheck "Full Control" in both your account and all security groups where you are a member. Do not change the Read permission Exit Registry and RebootMy question is, can this be done 'unattendedly' as windows installs?Thanks in advance, for your advice.Shark007
ikevin Posted January 7, 2005 Posted January 7, 2005 Yes it can! I found this, works great. The way it works. Run it. Log off then back on and if there are some start menu items that are not in abc order then right click and click Sort by Name and then THEY WILL ALWAYS SORT! If you run this registry key in unattended install then it will by it self always sort the items!;Automatically sort start munu and favorites menu[-HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrder\Favorites][-HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrder\Start Menu][-HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrder\Start Menu2]
durex Posted January 7, 2005 Posted January 7, 2005 Im pretty sure theres a regtweak for this, but I dont seem to have it in my tweaks file... perhaps check the tweaks pinned thread.:EDIT:Perhaps try this...http://www.msfn.org/board/index.php?showto...10entry191748
Shark007 Posted January 7, 2005 Author Posted January 7, 2005 Thank you very much ikevinworks perfectly unattended.EDIT: I import my (this) regtweak by CMDLINES.TXTShark007
Afterdawn Posted January 7, 2005 Posted January 7, 2005 Yes it can! I found this, works great. The way it works. Run it. Log off then back on and if there are some start menu items that are not in abc order then right click and click Sort by Name and then THEY WILL ALWAYS SORT! If you run this registry key in unattended install then it will by it self always sort the items!;Automatically sort start munu and favorites menu[-HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrder\Favorites][-HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrder\Start Menu][-HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrder\Start Menu2]This isn't a permanent solution... because sometimes the MenuOrder hive gets restored (typically when installing a certain application). Very annoying.
Tsunami Posted January 7, 2005 Posted January 7, 2005 Yes, that registry tweak isn't permanent. I use RegPerm to set the permissions on the MenuOrder key. The following command sets Everyone's permissions to read only:REGPERM /K HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrder /A:Everyone:R /Q
Shark007 Posted January 9, 2005 Author Posted January 9, 2005 REGPERM /K HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrder /A:Everyone:R /QTsunami, thanks for the input.Regperm works nicely.Shark007
DigeratiPrime Posted January 9, 2005 Posted January 9, 2005 Does that tweak resort the start menu automatically and how often?
ikevin Posted January 9, 2005 Posted January 9, 2005 ;Automatically sort start munu and favorites menu[-HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrder\Favorites][-HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrder\Start Menu][-HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrder\Start Menu2]This will work PERMINATLY in an unattended install. It has been tested completely. It is permanent when not unattended but u must do this:1. right click start menu and click Sort by Name then they will sort automatically2. log off right after step one and then log back in3. it will now always auto sort the start menu for that userif that doesnt work, you're doing something wrong
jimanny Posted January 27, 2005 Posted January 27, 2005 I've been playing around with this issue for a bit now and I'll share what I've learned - hopefully it will help someone.It's been my experience that removing the MenuOrder key does work for a normal install, but only for so long. That is manually install windows, log in, remove the key, and restart. It seems that eventually something happens and it ends up unsorted again.For my unattended install project, I've tried removing the key at T-12 as others have suggested with no luck.Then I came across this at theeldergeek which explains how to sort alphabetically by restricting the permissions on the MenuOrder key. This one has worked great for me for a manual install - now to implement it unattended.Here's what I done which works for me using RegPerm:AlphabetizeStartMenu.vbs:Option Explicit' Usage:' AlphabetizeStartMenu.vbs <drive> <user>' Example:' AlphabetizeStartMenu.vbs D: NewUserdim oWS, oFS, oArgs, regperm, user, drivedim runonceex, menuorder, usersstringset oWS = WScript.CreateObject("WScript.Shell")Set oFS = CreateObject("Scripting.FileSystemObject")set oArgs = WScript.Argumentsdrive = oArgs(0)regperm = drive & "\Tweaks\Tools\regperm.exe /K"user = oArgs(1)runonceex = "\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\"menuorder = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrder"usersstring = "/A:Administrators:R /A:" & user & ":R /A:RESTRICTED:R /A:System:F /F /I /Q"'set permissions on MenuOrder key to prevent reordering'these are set with RunOnceEx just after the new user is logged inoWS.RegWrite "HKLM" & runonceex & "Title","Alphabetize the Start Menu"oWS.RegWrite "HKLM" & runonceex & "Flags",20,"REG_DWORD"oWS.RegWrite "HKLM" & runonceex & "install01\","Create MenuOrder Key"oWS.RegWrite "HKLM" & runonceex & "install01\1",drive & "\Tweaks\Tools\CreateMenuOrderKey.vbs"oWS.RegWrite "HKLM" & runonceex & "install02\","Add RegPerm Command Line"oWS.RegWrite "HKLM" & runonceex & "install02\1",regperm & " " & menuorder & " " & usersstringCreateMenuOrderKey.vbsOption Explicitdim oWS, oFSset oWS = WScript.CreateObject("WScript.Shell")Set oFS = CreateObject("Scripting.FileSystemObject")'create MenuOrder keyoWS.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrder\", "", "REG_SZ"I'm actually calling AlphabetizeStartMenu.vbs from a WIHU interface which comes up using RunOnceEx right after I first logon as administrator. The WIHU command sends the CDROM drive letter it finds and new user name that I create with WIHU. BTW, the WIHU install.ini section looks like this for reference:[Registry Tweaks]selected = 1collapsed = 1description.0 = Keep the Start Menu alphabeticcommand.0 = %SRCDRIVE%\Tweaks\Tools\AlphabetizeStartMenu.vbs %SRCDRIVE% %NewUserName%selected.0 = 1This is working perfect for me now! After I logon as the newly created user, the start menu is perfectly ordered and I am not able to reorder it by dragging. I have not tried this without WIHU but it's my guess that if AlphabetizeStartMenu.vbs <drive> <user> was added to RunOnceEx at T-12 it would work as long as <user> existed at the time of the first logon. Perhaps you could create the user with a batch file and a reg file like here. Then, after you logon again, the MenuOrder key permissions would be set for the user specified.Want to know more? The reason I'm creating the MenuOrder key from AlphabetizeStartMenu.vbs is because I discovered that the key does not exist until after the user is fully logged in - well after RunOnceEx command executes. So basically RegPerm could not set the permissons on a key that did not exist. I discovered this by adding some debug code to the bottom of AlphabetizeStartMenu.vbs:oWS.RegWrite "HKLM" & runonceex & "install03\","Echo Command Line"oWS.RegWrite "HKLM" & runonceex & "install03\1","cmd.exe /k @echo " & regperm & " " & menuorder & " " & usersstringThis basically confirmed that the RegPerm command line was correct during RunOnceEx by showing it in a DOS box. It also prevented RunOnceEx from completing so from the same DOS box, I simply started regedit and found the MenuOrder key was not yet created. Then I closed the DOS box and refreshed regedit every second while windows finished it's startup routines with me logged in as the new user. Guess what - MenuOrder never showed up! But it did show up as soon as I dragged an item around in the start menu. I found this very interesting.As a result, I'm not sure why removing the MenuOrder key at T-12 seems to work for some because for my install, the key already does not exist at that time anyway.I would be happy to know if you found this info useful.The End- jimanny
Astalavista Posted January 27, 2005 Posted January 27, 2005 ;-----;----- Sort Start Menu and Favorites in Alphabetical Order (All Windows);-----[-HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrder]works everytime... never fail.make sure that this is included in your regtweaks that u launch at t-13
jimanny Posted January 27, 2005 Posted January 27, 2005 I'm installing from an nLite compilation with the "Sort Start Menu Alphabetically" option UNchecked. There are components removed so maybe MenuOrder was already removed with some other nLite option? Anyway here's a screeny of my install at T-12... where's MenuOrder? Also, it seems to me that even if the MenuOrder key is removed during install, at some point the user is going to accidently or intentionally reorder the start menu which would cause the key to be created. Then once it exists, I think additional shortcuts get added (from installing programs etc.) to the bottom of the list, and there you have the problem.It seems to me that setting read-only permissions on the thing during a RunOnceEx is the real "never fail" solution.- jimanny
BFCF Posted January 28, 2005 Posted January 28, 2005 ;-----;----- Sort Start Menu and Favorites in Alphabetical Order (All Windows);-----[-HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrder]works everytime... never fail.make sure that this is included in your regtweaks that u launch at t-13 I put that regtweak on my regtweaks that i launch in cmdlines.txt but when i install a new program, the Programs menu is not automatically sorted. What i am doing wrong?Thanks.
jimanny Posted January 28, 2005 Posted January 28, 2005 @BFCFFor my unattended install, the MenuOrder key does not exist at T-12 anyway (see here) so removing the MenuOrder key via cmdlines.txt and a regtweak is futile. This is probably the case for you too. I used this techinique to sort it permanently and unattended too!- jimanny
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