home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / menuor_1 / menuorga.vbs next >
Encoding:
Text File  |  1998-07-19  |  2.2 KB  |  60 lines

  1. ' ******************************
  2. ' *     Menu Organizer 1.1     *
  3. ' *                            *
  4. ' *    Author: Ashley Hatch    *
  5. ' *      Date: 7/19/1998       *
  6. ' *                            *
  7. ' ******************************
  8.  
  9.  
  10. ' *** Variables to control program flow ***
  11.     Dim Go
  12.     Dim KillStartMenu
  13.     Dim KillFavoritesMenu
  14.     Dim StartDone
  15.     Dim FavDone
  16.  
  17.     StartDone = 0
  18.     FavDone = 0
  19.  
  20. ' *** Inform user of the operation and allow them to proceed or cancel ***
  21.     Go = MsgBox("This script will reset your Start Menu and/or your IE4 Favorites Menu to its default-ordering scheme", _
  22.                 vbOKCancel, "Menu Organizer 1.1")
  23.  
  24.     If Go = vbCancel Then
  25.         WScript.Quit
  26.     End If
  27.  
  28. ' *** Creates the variable which allows us to delete the necessary registry entries ***
  29.     Dim WSHShell
  30.     Set WSHShell = WScript.CreateObject("WScript.Shell")
  31.  
  32. ' *** Allow user to choose to clean their Start Menu and to executes that decision ***
  33.     KillStartMenu = MsgBox("Do you wish to reset your Start Menu?", vbYesNo + 32, "Start Menu Organizer 1.1")
  34.  
  35.     If KillStartMenu = vbYes Then
  36.         WSHShell.RegDelete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrder\Start Menu\"
  37.         StartDone = 1
  38.     End IF
  39.  
  40. ' *** Allow user to choose to clean their IE4 Favorites Menu and to executes that decision ***
  41.     KillFavoritesMenu = MsgBox("Do you wish to reset your IE4 Favorites Menu?", vbYesNo + 32, "IE4 Favorites Menu Organizer 1.1")
  42.  
  43.     If KillFavoritesMenu = vbYes Then
  44.         WSHShell.RegDelete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrder\Favorites\"
  45.         FavDone = 1
  46.     End IF
  47.  
  48. ' *** Outputs information relating the finalization of the sorting of the menus ***
  49.     If StartDone = 1 Then
  50.         If FavDone = 1 Then
  51.             MsgBox "Your menus are now sorted! You need to reboot to finalize the changes.", vbOkOnly + 64, "Thank you for using Menu Organizer 1.1"
  52.         
  53.         Else
  54.             MsgBox "Your Start Menu is now sorted! You need to reboot to finalize the change.", vbOkOnly + 64, "Thank you for using Start Menu Organizer 1.1"
  55.         End If
  56.     Else
  57.         If FavDone = 1 Then
  58.             MsgBox "Your Favorites Menu is now sorted! You need to reboot to finalize the change.", vbOkOnly + 64, "Thank you for using IE4 Favorites Menu Organizer 1.1"
  59.         End If
  60.     End If