home *** CD-ROM | disk | FTP | other *** search
/ Chip 2003 December / CMCD1203.ISO / Software / Freeware / Utilitare / pebuilder / plugin / autorun / autorun.cmd < prev    next >
OS/2 REXX Batch file  |  2003-10-04  |  1KB  |  29 lines

  1. @echo off
  2. rem
  3. rem AutoRun (Startup Group for WinPE & Nu2Menu)
  4. rem Copyright (c) 2003 Erwin Veermans (http://www.veder.com/nwdskpe/)
  5. rem
  6.  
  7. if not exist %SystemRoot%\System32\Keydown.exe goto _default
  8. rem Disable all AutoRun by Toggling Scroll-Lock and Num-Lock and Caps-Lock ON
  9. %SystemRoot%\System32\Keydown.exe 145 144 20
  10. if errorlevel 1 goto _end
  11. rem Confirm each AutoRun by toggling Scroll-Lock ON (Debug Mode)
  12. %SystemRoot%\System32\Keydown.exe 145
  13. if errorlevel 1 goto _debug
  14. goto _default
  15.  
  16. :_debug
  17. if not exist %SystemRoot%\System32\debugrun.cmd goto _end
  18. start "Scroll-Lock detected: Entering Debug Mode" "%SystemRoot%\System32\debugrun.cmd"
  19. goto _end
  20.  
  21. :_default
  22. rem First Group, Pre-Default Group  
  23. for %%i in (%SystemRoot%\System32\autorun1*.cmd %SystemRoot%\System32\autorun2*.cmd) do start "%%i" /wait /min "%%i"
  24. rem Default Group, Post-Default Group
  25. for %%i in (%SystemRoot%\System32\autorun_*.cmd %SystemRoot%\System32\autorun9*.cmd) do start "%%i" /wait /min "%%i"
  26. rem Post Default Concurrent Group (no /wait)
  27. for %%i in (%SystemRoot%\System32\autorun0*.cmd) do start "%%i" /min "%%i"
  28. :_end
  29.