Thanks for all this wonderful info David - but I forgot to mention
that I'm using IE6 with all patches and updates. I presume this will
work for this version?
--
Lorraine
``````````````
PS - thanks for pointing out how lazy I am, and btw - I was not one of
the people who "whinged at MS" as you so aptly put it.
"David Candy" <.> wrote in message
Well you can't. People like you whinged at MS over this featrure in
95/NT4 so they gave you what you asked for. This only does classic but
just modify it. How important is stuff like this. You are lazy.
IE4's Desktop Update (which is included in Windows 98) added the
ability to move the order of items on the Start Menu. A consequence of
this is that there is no longer automatic sorting of the menus. This
vbs file sorts the menu alphabetically with sub menus at the top.
IE5's Desktop Update added a Sort by Name to the right click menu for
every sub menu that sorts only that sub menu.
These two scripts sorts all sub menus for both IE5's and IE4's Desktop
Update.
Notes
a.. IE5's Desktop Update is installed on every Windows 98 Second
Edition system.
b.. IE4's Desktop Update is installed on every Windows 98 system.
c.. IE5's Desktop Update is installed on every Windows 98 system
that IE5 is installed.
d.. IE4's Desktop Update is installed on Windows 95 systems if it
was chosen when installing IE4.
e.. IE5's Desktop Update is only installed on Windows 95 systems if
IE4's Desktop Update was installed before IE4 was installed.
f.. To move the order of items on a menu click and drag the item to
where it should be. A black bar will show where it will be.
g.. To sort a menu with IE5's Desktop Update, right click anywhere
on the menu to be sorted and choose Sort by Name.
Sort All Menus.vbs
Sort All Menus.vbs will prompt to sort
a.. the Start Menu, the Documents menu, the Programs menu, and its'
sub menus
b.. the Favourites menu and it's sub menus
The first time each of these is run they register their path in the
registry. The second and subsequent times they are run only the name
needs to be typed into the Start - Run dialog box. They can be renamed
without problems.
Copy the following lines into a New Text Document (use Notepad) and
name it SortAllMenus.vbs. The name needs to be enclosed in quotation
marks in notepad else notpad with add a .txt suffix to the name.
'SortAllMenus.vbs
'Sorts the Start and Favourites menus.
'
'Serenity Macros
http://www.angelfire.com/biz/serenitymacros
'David Candy (e-mail address removed)
'
On Error Resume Next
vbPara=vbCRLF & vbCRLF
strExplain="Sort All Menus sorts the Start Menu and the Favourites
menu." & vbPara & "You will be prompted to sort the Start Menu and all
its' sub menus then to sort the Favourites menu and all its' sub
menus." & vbPara & "This is for use with Windows 98, Windows 95 with
IE4's Desktop Update, Windows 98 upgraded with IE5, or Windows 95 with
IE4's Desktop Update upgraded with IE5." & vbPara & "Continue?"
strTitle="Sort All Menus"
Dim Sh
Set Sh = WScript.CreateObject("WScript.Shell")
ReportErrors "Creating Shell"
Sh.RegWrite "HKLM\Software\Microsoft\Windows\CurrentVersion\App
Paths\" & Wscript.ScriptName & "\", Chr(34) & Wscript.ScriptFullName &
Chr(34)
Sh.RegWrite "HKLM\Software\Microsoft\Windows\CurrentVersion\App
Paths\" & Left(Wscript.ScriptName, Len(Wscript.ScriptName)-3) & "exe"
& "\", Chr(34) & Wscript.ScriptFullName & Chr(34)
ReportErrors "Updating App Paths"
If MsgBox(strExplain ,vbQuestion + vbYesNo , strTitle) =6 then
If MsgBox("Sort the Start Menu and all its' sub menus?",vbQuestion +
vbYesNo + vbDefaultButton2, strTitle) =6 then
Sh.RegDelete
"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrder\Start
Menu\"
If Err.number=-2147024894 then err.clear
ReportErrors "Sorting Start and Programs menu"
End If
If MsgBox("Sort the Favourites Menu and all its' sub
menus?",vbQuestion + vbYesNo + vbDefaultButton2, strTitle) =6 then
Sh.RegDelete
"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrder\Favorites\"
If Err.number=-2147024894 then err.clear
ReportErrors "Sorting Favourites menu"
End If
End If
ReportErrors "Main"
VisitSerenity
Sub ReportErrors(strModuleName)
If err.number<>0 then Msgbox "An unexpected error occurred. This
dialog provides details on the error." & vbCRLF & vbCRLF & "Error
Details " & vbCRLF & vbCRLF & "Script Name" & vbTab &
Wscript.ScriptFullName & vbCRLF & "Module" & vbtab & vbTab &
strModuleName & vbCRLF & "Error Number" & vbTab & err.number & vbCRLF
& "Description" & vbTab & err.description, vbCritical + vbOKOnly,
"Something unexpected"
Err.clear
End Sub
Sub VisitSerenity
If MsgBox("This program came from the Serenity Macros Web Site" &
vbCRLF & vbCRLF & "Would you like to visit Serenity's Web Site now?",
vbQuestion + vbYesNo + vbDefaultButton2, "Visit Serenity Macros") =6
Then
sh.Run "http:\\
www.angelfire.com\biz\serenitymacros"
End If
End Sub
Sort Start Menu.vbs
Sort Start Menu.vbs sorts the Start Menu, Programs menu and its' sub
menus, Favourites menu and its' sub menus, and the documents menu
without any prompting. It's for automatically sorting the Start Menu
and can be used in Task Scheduler or the Startup menu.
Copy the following lines into a New Text Document (use Notepad) and
name it SortStartMenuvbs. The name needs to be enclosed in quotation
marks in notepad else notpad with add a .txt suffix to the name.
'SortStartMenu.vbs
'Sorts the Start and Favourites menus without prompting
'
'Serenity Macros
http://www.angelfire.com/biz/serenitymacros
'David Candy (e-mail address removed)
'
On Error Resume Next
strTitle="Sort All Menus"
Dim Sh
Set Sh = WScript.CreateObject("WScript.Shell")
ReportErrors "Creating Shell"
Sh.RegWrite "HKLM\Software\Microsoft\Windows\CurrentVersion\App
Paths\" & Wscript.ScriptName & "\", Chr(34) & Wscript.ScriptFullName &
Chr(34)
Sh.RegWrite "HKLM\Software\Microsoft\Windows\CurrentVersion\App
Paths\" & Left(Wscript.ScriptName, Len(Wscript.ScriptName)-3) & "exe"
& "\", Chr(34) & Wscript.ScriptFullName & Chr(34)
ReportErrors "Updating App Paths"
Sh.RegDelete
"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrder\Start
Menu\"
If Err.number=-2147024894 then err.clear
ReportErrors "Sorting Start and Programs menu"
Sh.RegDelete
"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrder\Favorites\"
If Err.number=-2147024894 then err.clear
ReportErrors "Sorting Documents menu"
ReportErrors "Main"
Sub ReportErrors(strModuleName)
If err.number<>0 then Msgbox "An unexpected error occurred. This
dialog provides details on the error." & vbCRLF & vbCRLF & "Error
Details " & vbCRLF & vbCRLF & "Script Name" & vbTab &
Wscript.ScriptFullName & vbCRLF & "Module" & vbtab & vbTab &
strModuleName & vbCRLF & "Error Number" & vbTab & err.number & vbCRLF
& "Description" & vbTab & err.description, vbCritical + vbOKOnly,
"Something unexpected"
Err.clear
End Sub