Mega Code Archive

 
Categories / Delphi / Examples
 

Ordering those unordered Start and Favorites menus

Title: Ordering those unordered Start and Favorites menus Question: Do you ever get annoyed of those unordered Start Menu and Favorites Menus? If yes then here's a quick remedy... Answer: The following routines will only work as far as I know on Windows 9x and NT 4 - it doesn't work on Windows ME, Windows 2000 or Windows XP. const SStartMenuPath = 'Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrder\Start Menu'; SFavoritesPath = 'Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrder\Favorites'; function OrganizeStartMenu: Boolean; var Reg: TRegistry; begin Reg := TRegistry.Create; try if Reg.KeyExists(SStartMenuPath) then Reg.DeleteKey(SStartMenuPath); finally Reg.Free; end; end; function OrganizeFavorites: LongInt; var Reg: TRegistry; begin Reg := TRegistry.Create; try if Reg.KeyExists(SFavoritesPath) then Reg.DeleteKey(SFavoritesPath); finally Reg.Free; end; end; Enjoy!