Rob van der Woude's Scripting Pages
Powered by GeSHi

Source code for iefavsrt.bat

(view source code of iefavsrt.bat as plain text)

  1. @ECHO OFF
  2. ECHO IEFavSrt.bat,  Version 1.00 for Windows 2000
  3. ECHO Make Internet Explorer automatically sort its favorites
  4. ECHO folders by deleting the "Order" value from the registry key
  5. ECHO "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrder\Favorites"
  6. ECHO.
  7. ECHO Usage:  IEFAFSRT
  8. ECHO.
  9. ECHO Notes:  Idea from PC Advisor magazine (http://www.pcadvisor.co.uk).
  10. ECHO         Tested in Windows 2000 Professional only.
  11. ECHO         Requires REG.EXE, available in Windows 2000 or the NT 4 Resource Kits.
  12. ECHO.
  13. ECHO Written by Rob van der Woude
  14. ECHO http://www.robvanderwoude.com
  15. ECHO.
  16. :: Check Windows version
  17. IF NOT "%OS%"=="Windows_NT" GOTO End
  18. VER | FIND.EXE "Windows 2000" >NUL
  19. IF ERRORLEVEL 1 GOTO End
  20. :: Abort if any command line argument was passed
  21. IF NOT "%~1"=="" GOTO End
  22. :: Check version of REG.EXE
  23. REG.EXE 2>&1 | FIND.EXE "Windows 2000" >NUL
  24. IF ERRORLEVEL 1 GOTO End
  25. :: The actual command
  26. REG.EXE Delete "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrder\Favorites" /V "Order"
  27. :End
  28. :: Done
  29.  

page last modified: 2024-04-16; loaded in 0.0081 seconds