Rob van der Woude's Scripting Pages
Powered by GeSHi

Source code for history.bat

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

  1. @ECHO OFF
  2. SETLOCAL
  3.  
  4. :: Parameter check
  5. IF "%1"=="" GOTO Syntax
  6. IF /I NOT "%1"=="/C" IF /I NOT "%1"=="/D" GOTO Syntax
  7. IF /I "%1"=="/D" (SET D=RD) ELSE (SET D=MD)
  8.  
  9. :: Where should the shortcut be placed?
  10. IF EXIST %UserProfile%\Desktop (
  11. 	SET Desktop=Desktop
  12. ) ELSE (
  13. 	IF EXIST %UserProfile%\Bureaublad SET Desktop=Bureaublad
  14. )
  15. :: Quit if any doubt
  16. IF "%Desktop%"=="" GOTO:EOF
  17.  
  18. :: Create/delete the shortcut
  19. %D% "%UserProfile%\%Desktop%\Internet History.{FF393560-C2A7-11CF-BFF4-444553540000}"
  20.  
  21. :: Done
  22. GOTO End
  23.  
  24. :Syntax
  25. ECHO.
  26. ECHO History.bat,  Version 1.00 for Windows with IE 4 or 5
  27. ECHO Creates or deletes a shortcut "Internet History" on your desktop
  28. ECHO.
  29. ECHO Tip by Nick Francesco at Rochester RoadRunner
  30. ECHO http://www.rochester.rr.com/articles/nick_tips/
  31. ECHO.
  32. ECHO Batch file created by Rob van der Woude
  33. ECHO http://www.robvanderwoude.com
  34. ECHO.
  35. ECHO Usage:
  36. ECHO.
  37. ECHO     %~n0  /C                     to create the shortcut
  38. ECHO     %~n0  /D                     to delete the shortcut
  39.  
  40. :End
  41. ENDLOCAL
  42.  

page last modified: 2024-02-26; loaded in 0.0190 seconds