Rob van der Woude's Scripting Pages
Powered by GeSHi

Source code for bootdriv.cmd

(view source code of bootdriv.cmd as plain text)

  1. /* Check for boot drive                                                   */
  2. /* Techniques explained by Dick Goran in his January 1997 Rexx Column in  */
  3. /* OS/2 Magazine, found at http://www.toward.com/cfsrexx/os2-mag/9701.htm */
  4.  
  5. /* RLANUTIL.DLL, containg GetBootDrive, was added in Warp Connect */
  6. call RxFuncAdd "GetBootDrive", "RLANUTIL", "GetBootDrive"
  7. if RxFuncQuery( "GetBootDrive" ) = 0 then do
  8. 	bootdrive = GetBootDrive()
  9. end
  10. else do
  11. 	/* This should work in any pre Warp OS/2 version too */
  12. 	path = value( "PATH", , "OS2ENVIRONMENT" )
  13. 	parse upper value path with ":\OS2\SYSTEM" -1 bootdrive +2
  14. end
  15. say "Boot drive = "||bootdrive
  16.  

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