home *** CD-ROM | disk | FTP | other *** search
/ Chip 2005 February / CMCD0205.ISO / Software / Freeware / Utilitare / pebuild / plugin / autorun / debugrun.cmd < prev    next >
OS/2 REXX Batch file  |  2004-02-20  |  1KB  |  40 lines

  1. @echo off
  2. if "%1"==":" if not "%2"=="" goto %2
  3. rem
  4. rem DebugRun (Startup Group for BartPE & Nu2Menu)
  5. rem Copyright (c) 2003-2004 Erwin Veermans (http://www.veder.com/nwdskpe/)
  6. rem
  7.  
  8. echo.
  9. echo AutoRun Debug Mode
  10. echo.
  11.  
  12. if not exist %SystemRoot%\System32\Keydown.exe goto _done
  13.  
  14. rem First Group, Pre-Default Group  
  15. for %%i in (%SystemRoot%\System32\autorun1*.cmd %SystemRoot%\System32\autorun2*.cmd) do call %0 : _ask %%i /wait /min
  16. rem Default Group, Post-Default Group
  17. for %%i in (%SystemRoot%\System32\autorun_*.cmd %SystemRoot%\System32\autorun9*.cmd) do call %0 : _ask %%i /wait /min
  18. rem Post Default Concurrent Group (no /wait)
  19. for %%i in (%SystemRoot%\System32\autorun0*.cmd) do call %0 : _ask %%i /min
  20. goto _done
  21.  
  22. :_ask
  23. shift
  24. shift
  25. echo Would you like to run '%1' [Y/N]?
  26. %SystemRoot%\System32\Keydown.exe 0
  27. if not "%errorlevel%"=="121" if not "%errorlevel%"=="89" goto _end
  28. start "%1" %2 %3 %4 %5 "%1"
  29. goto _end
  30.  
  31. :_done
  32. echo.
  33. echo AutoRun Done
  34. echo.
  35. pause
  36. exit
  37. goto _end
  38.  
  39. :_end
  40.