Jump to content

Permanent autoarrange in Start Menu!


Recommended Posts

UPDATED!

The new version uses VBScript instead of the CMD file and it doesn't show up at all during your first logon into your newly created user account. I have also solved the problem that used to take place on some machines when "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrder\Start Menu2\Programs" key was already created before the launch of my previous version of the script. The new version first deletes the MenuOrder key and all the sub keys and then it creates the new key without the values and sets permissions using the REGPERM.EXE tool.

Hello all!!!

I have found a working solution that allows you to make the default account (and all the other user accounts created in the system later) autoarrange your Start Menu in alphabetical order. It runs once automatically on the first logon using the RunOnce registry key (I presume that you have the "OemPreinstall=Yes" line in your WINNT.SIF file). :)

First of all, you'll need the REGPERM utility.

Then, you'll have to put the regperm.exe file in your $OEM$\$$\System32\ folder which is located in in your Windows distribution folder.

Next you'll have to create the following file, call it "autoorder.vbs" and also put it in $OEM$\$$\System32\:

set ws = WScript.CreateObject("WScript.Shell")

ws.Run ("REG DELETE "&Chr(34)&"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrder"&Chr(34)&" /F"),0,1
ws.Run ("REG ADD "&Chr(34)&"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrder"&Chr(34)&" /F"),0,1
ws.Run ("REGPERM.EXE /K "&Chr(34)&"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrder"&Chr(34)&" /A:Everyone:R"),0,1

Now you'll have to add the following line to your CMDLINES.TXT file (thanks for the tip, prathapml):

"REG ADD HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce /V AutoOrder /D autoorder.vbs /F"

(Don't forget to insert the line [COMMANDS] above the line if you're creating a new file!)

Now make your ISO, burn it and you're done! :thumbup

Link to comment
Share on other sites


It could be simplified a bit (the last two steps become one, I mean).

First of all, you'll need two utilities, one is CMDOW and another one is REGPERM.

Then, you'll have to put cmdow.exe and regperm.exe files in your $OEM$\$$\System32\ folder which is located in in your Windows distribution folder.

Next you'll have to create the following file, call it AUTOORDER.CMD and also put it in $OEM$\$$\System32\:

@ECHO OFF
CMDOW @ /HID

REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrder\Start Menu2\Programs" /F

REGPERM.EXE /K "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrder\Start Menu2\Programs" /A:Everyone:R /Q

EXIT

After this step, execute this command through cmdlines.txt or any batch-file that you run from it:
REG ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce /V AutoOrder /D "autoorder.cmd" /f

Link to comment
Share on other sites

  • 1 month later...
It could be simplified a bit (the last two steps become one, I mean).
prathapml, thanks for the idea, but the line that you wrote here will not work because of the wrong syntax. Compare your line:
REG ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce /V AutoOrder /D "autoorder.cmd" /f

and mine

"REG ADD HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce /V AutoOrder /D autoorder.vbs /F"

Every line in CMDLINES.TXT should have quotes (I have checked it out myself five minutes ago). But the idea was quite useful. And yet, we should write this value in HKCU not in the HKLM. :)

Link to comment
Share on other sites

  • 2 months later...

You may be able to achieve the same effect without using the REGPERM utility simply by deleting the MenuOrder key each time the user logs in.

set ws = WScript.CreateObject("WScript.Shell")

ws.Run ("REG DELETE "&Chr(34)&"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrder"&Chr(34)&" /F"),0,1

"REG ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /V AutoOrder /D autoorder.vbs /F"

You could also achieve the same effect using an INF file:

;ResetStartMenuOrder.inf
;Simple INF file to reset the order of the items in the Start Menu

[Version]
   Signature=$CHICAGO$

;Install the ResetStartMenuOrder.inf file
[DefaultInstall]
   AddReg=ResetStartMenuOrder.AddReg
   CopyFiles=ResetStartMenuOrder.Copyfiles

[ResetStartMenuOrder]
   DelReg=ResetStartMenuOrder.DelReg

[ResetStartMenuOrder.AddReg]
   HKLM,"%Run%",ResetStartMenuOrder,,"%InstallINF% ResetStartMenuOrder 128 %11%\ResetStartMenuOrder.inf"

;Resets the order of the StartMenu by deleting the appropriate registry entry
[ResetStartMenuOrder.DelReg]
   HKCU,"Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrder\Start Menu"

[SourceDisksNames]
   1=%DiskName%,,0

[ResetStartMenuOrder.Copyfiles]
   ResetStartMenuOrder.inf

[SourceDisksFiles]
   ResetStartMenuOrder.inf=1

[DestinationDirs]
   ResetStartMenuOrder.Copyfiles=11

[Strings]
   Diskname        = "ResetStartMenuOrder Installation, Disk #1"
   Run             = "SOFTWARE\Microsoft\Windows\CurrentVersion\Run"
   InstallINF      = "rundll32 setupapi,InstallHinfSection"

Save the code above as ResetStartMenuOrder.inf and copy to your $OEM$ folder.

Add the following to your CMDLINES.TXT file:

;Install ResetStartMenuOrder.inf
"rundll32 setupapi,InstallHinfSection DefaultInstall 128 .\ResetStartMenuOrder.inf"

Link to comment
Share on other sites

I just tried this today, and it didn't work for me :(

Directly I want to mention that I didn't test this with a format (so I didn't tested it a T=12

First I tried PryGuy's method (first post) this worked the first time for me. The menuorder was correct. Then I shifted the menuorder by draggging them. I rebooted, but the menuorder wasn't changed.

I also tried gtaylor method, but this one really doesn't work for me. my menuorder stays messed up.

what could be the problem?

Link to comment
Share on other sites

I have been testing with this, and this is the best way for me to let it work:

1. Create menuorder.cmd

menuorder.cmd:

cmdow @ /HID
@echo off

reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrder\Favorites" /F
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrder\Start Menu" /F
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrder\Start Menu2" /F

2. Copy this file to the $OEM$\$$\system32 folder

3. modify your CMDLINES.TXT

"reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /V menuorder /D menuorder.cmd /F"

I am not sure if I did the quotation right!! Could someone please check it?

the only anoying thing is that when you boot, you just see a quick flash of the batch file.

Edited by erik_demon
Link to comment
Share on other sites

You could create a file called "MenuOrder.reg" in your windows directory (or \$OEM$\$$\ directory), like this:

Windows Registry Editor Version 5.00

[-HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrder]

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run]
"MenuOrder"="regedit /s menuorder.reg"

, then add the following line to CMDLINES.TXT like so:

"regedit /s menuorder.reg"

Not only will it resort the start menu, it will also sort the favorites menu.

EDIT: I changed the post so that instead of reading "clear the start menu order", it reads "resort the start menu". Sorry about that typo.

Edited by dougiefresh
Link to comment
Share on other sites

The INF file I created should work. Which part doesn't work?

Is the INF file copied to your C:\WINDOWS\SYSTEM32 folder?

Is the ResetStartMenuOrder key created in the registry?

Is the MenuOrder\Start Menu key being deleted from the registry?

The name of the INF file must be "ResetStartMenuOrder.inf". Any variation on this and the INF file will not work.

Link to comment
Share on other sites

  • 2 weeks later...

another related question.

can i sort silent in some way the APPlications folder ?

start Menu -->

    --> All Programs -->

        --> APPlications -->

            --> .. i keep here all links to my applications silently installed with WPI .

            -->

            -->

see photo

post-40173-1118083396_thumb.jpg

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...