home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / REXXBOOT.ZIP / TEST.CMD < prev   
OS/2 REXX Batch file  |  1993-04-12  |  891b  |  39 lines

  1. /* Test REXXBOOT functions. */
  2.  
  3. Say 'WARNING: This rexx program REBOOTS your computer!'
  4. Say ''
  5. Say 'Enter REBOOT to continue:'
  6. Parse Pull answer
  7.  
  8. if answer <> 'REBOOT' then
  9. do
  10.   Say 'Okay, goodbye.'
  11.   exit
  12. end
  13.  
  14. Call RxFuncAdd 'SysReboot','REXXBOOT','SysReboot'
  15. Call RxFuncAdd 'SysSyncDisk','REXXBOOT','SysSyncDisk'
  16.  
  17. Say 'First we will issue SysSyncDisk, which calls DosShutdown with'
  18. Say 'the parameter 1L.  UNDER OS/2 2.1 (6.498+) this has the effect'
  19. Say 'of flushing all disk caches.  Under 2.0, who knows?'
  20. Say ''
  21. Say 'Press Enter to continue:'
  22. Parse Pull junk
  23.  
  24. Call SysSyncDisk
  25.  
  26. Say 'Next, we will call SysReboot, which performs an orderly shutdown'
  27. Say 'and performs a reboot.  If DOS.SYS is not loaded, you will not'
  28. Say 'reboot.  See RC for the reason.'
  29. Say ''
  30. Say 'Press Enter to continue:'
  31. Parse Pull junk
  32.  
  33. Say 'Goodbye...'
  34.  
  35. Call SysReboot
  36.  
  37.  
  38.  
  39.