home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 30 fixes_v / 30-fixes_v.zip / fixmouse.cmd < prev    next >
OS/2 REXX Batch file  |  1995-04-28  |  3KB  |  118 lines

  1. /* FIXMOUSE - Fix SVGA Mouse  */
  2. /* Part of the RemoteControl/2 1.2.02 CSD */
  3. /* Copyright 1995 -  Compuware Corporation */
  4.  
  5. /* Required files: PPM101A.NEW */
  6.  
  7. /* trace ?all */
  8. ARG szParameters
  9. '@echo off'
  10.    /* Save the calling environment */
  11.    nRC = setlocal()
  12.  
  13.    call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  14.    call SysLoadFuncs
  15.  
  16. say ''
  17. say 'Locating target directory...'
  18.  
  19.    szDBTKENV = VALUE('DBTKENV',,'OS2ENVIRONMENT')
  20.    PARSE UPPER VAR szDBTKENV szDBTKENV
  21.    nEnvironPos = POS('\ENVIRON',szDBTKENV)
  22.    if nEnvironPos \= 0 then
  23.         szDBTKENV = SUBSTR(szDBTKENV,1,nEnvironPos-1)
  24.    szDriveDir=szDBTKENV
  25.  
  26. say ''
  27. say 'The target directory is '||szDriveDir
  28.  
  29.     szSourceDrive    = ''
  30.     szSourceDir      = ''
  31.     curdir= ''
  32.  
  33.  /*---------------------------------------------------------------------*/
  34.  
  35. say ''
  36. say 'Locating source directory...'
  37.  
  38.     parse source IsCmd IsOS2 MyCmdLine
  39.     szSourceDrive = substr(MyCmdLine, 1, 2)
  40.     szWork = filespec('PATH', MyCmdLine)
  41.     if szStrLength < 2 then
  42.         szSourceDir = ''
  43.     else 
  44.         szSourceDir = substr(szWork, 1, length(szWork) - 1)
  45.     curDir= szSourceDrive || szSourceDir
  46.  
  47. say ''
  48. say 'The source directory is '||curDir
  49.  
  50. /* Stop the PPM Process */
  51.  
  52. say ''
  53. say 'Stopping the PPM101A process... please wait...'
  54.  
  55. 'Killppr ppm101a'
  56.  
  57. call SysSleep 12
  58.  
  59. /* If stop of process was successful, copy the file from the current directory 
  60.     to the source directory, complete and suggest reboot*/
  61.  
  62. If rc = 0 Then Do
  63.         say ''
  64.         say 'Successfully stopped PPM101A'
  65.         say ''
  66.         say 'Begin copy of new PPM101A.EXE...'
  67.       'copy '|| curdir ||'\ppm101a.new ' || szDriveDir|| '\ppm101a.exe'   
  68.       If rc = 0 Then Do
  69.         '@echo on'
  70.         say ''
  71.         say ''    
  72.         say ''
  73.         say ''    
  74.         say ''
  75.         say ''    
  76.         say '          File copied successfully.'
  77.         say ''    
  78.         say ''
  79.         say ''        
  80.             say '        RemoteControl/2 FIXMOUSE successfully installed'
  81.         say '        Please reboot this machine.'
  82.         say ''
  83.         say ''    
  84.         say ''
  85.         say ''    
  86.         say ''
  87.         say ''    
  88.         say ''
  89.         say ''    
  90.         say ''
  91.         say ''        
  92.      end
  93.      else do
  94.         '@echo on'
  95.         say ''    
  96.         say '           Unable to copy PPM101A.EXE.'
  97.         say ''
  98.             say '        RemoteControl/2 FIXMOUSE did NOT install successfully'
  99.         say '        Please contact Compuware Customer Support.'
  100.         say ''
  101.         say ''    
  102.         say ''
  103.     end
  104.  
  105. end
  106. else do
  107.     '@echo on'
  108.     say ''    
  109.     say '          Unable to stop PPM101A.EXE.'
  110.     say ''
  111.         say '          RemoteControl/2 FIXMOUSE did NOT install successfully'
  112.     say '          Please contact Compuware Customer Support.'
  113.     say ''
  114.     say ''    
  115.     say ''
  116. end
  117.  
  118.