home *** CD-ROM | disk | FTP | other *** search
/ MPC Wizard 3.0 / WIZARD3_0.ISO / drivers / sound / mv_ps16 / manual.bat < prev    next >
DOS Batch File  |  1993-11-04  |  3KB  |  105 lines

  1. @echo off
  2. if "%debug%" == "yes" echo on
  3.  
  4. :: This program will manually install the necessary drivers
  5. :: to activate the Pro Sonic.
  6. :: It will update the system files accordingly.
  7.  
  8. :: It will also uninstall itself with the "uninstall" option
  9.  
  10. :: if invoked as 'manual', show syntax
  11. :: if invoked as 'a:manual' or '..\manual', demand cd to us
  12.  
  13.     if "%1" == ""                goto syntax
  14.     if not exist manual.bat            goto baddrive
  15.  
  16. :: if invoked as 'manual', show syntax
  17. :: if invoked as 'manual trgdir', skip windows parse
  18.  
  19.  
  20. :INSTALL
  21.  
  22. :: if trgdir does not exist as a directory, go to make it
  23. :: otherwise, offer a break, and go to copy files if continue.
  24. :: if necessary, create the directory and error if failed
  25. :: call the external "COPY DOS FILES" program, mancopy.bat
  26. :: if have windir, then call the external "COPY WIN FILES", mancopw.bat
  27.  
  28.     if not exist %1\nul            goto mkinstalldir
  29.      echo Warning: the directory '%1' exists.
  30.      echo Press CONTROL-C to stop this program.
  31.      pause
  32.      goto copyfiles
  33.  
  34.  :mkinstalldir
  35.     mkdir %1
  36.     if not exist %1\nul            goto badinstalldir
  37.  
  38.   :copyfiles
  39.     :: copy dos minimal set
  40.      CALL MANCOPY.BAT %1 
  41.      goto findconfigs
  42.  
  43.  
  44. :FINDCONFIGS
  45. :: find the DOS and Windows configuration files, error if failed
  46. :: goto the CONFIG or UNCONFIG for 'install' or 'uninstall'.
  47.  
  48.     set bootdrive=
  49.     if exist f:\config.sys if exist f:\autoexec.bat    set bootdrive=F:
  50.     if exist e:\config.sys if exist e:\autoexec.bat    set bootdrive=E:
  51.     if exist d:\config.sys if exist d:\autoexec.bat    set bootdrive=D:
  52.     if exist c:\config.sys if exist c:\autoexec.bat    set bootdrive=C:
  53.     if "%bootdrive%" == ""            goto nobootdrive
  54.  
  55. :CONFIG
  56.     :: update dos config.sys and autoexec.bat
  57.     CALL MANSEDD.BAT %1
  58.     goto doneconfig
  59.  
  60.  
  61. :doneconfig
  62.     echo The software has been copied and the system files updated.
  63.     echo CONFIG.SYS and AUTOEXEC.BAT were updated, the previous versions
  64.     echo were saved as CONFIG.### and AUTOEXEC.### (### from 000 to 999),
  65.     echo the largest ### indicating the most recent version.
  66.     goto quit
  67.  
  68. :syntax
  69.     echo Syntax: manual targetdir 
  70.     echo This program will manually copy the files into 'targetdir', and
  71.     echo will then automatically update CONFIG.SYS and AUTOEXEC.BAT (after
  72.     echo saving the previous versions of these files).
  73.     echo CONFIG.SYS
  74.     echo 'device=targetdir\pros.sys P220 D1 I7 E1'
  75.     echo AUTOEXEC.BAT
  76.     echo 'set blaster=a220 d1 i5'
  77.     echo CONFIG.SYS saved as CONFIG.000 through CONFIG.999.
  78.     echo AUTOEXEC.BAT saved as AUTOEXEC.000 through AUTOEXEC.999.
  79.     goto quit
  80.  
  81. :baddrive
  82.     echo This program should be started from the drive on which it resides.
  83.     echo The syntax: 'a:manual' or 'b:manual' should be replaced with switching
  84.     echo to the drive and then running the program, like:
  85.     echo       C:\DOS> a:
  86.     echo       A:\SUBDIR> cd \
  87.     echo       A:\> manual targetdir 
  88.     goto quit
  89.  
  90. :badinstalldir
  91.     echo Error: unable to create the directory '%1'.
  92.     goto quit
  93.  
  94. :nobootdrive
  95.     echo Error: unable to locate boot drive!
  96.     echo This drive must have both CONFIG.SYS and AUTOEXEC.BAT at the top.
  97.     goto quit
  98.  
  99. :quit
  100.     set bootdrive=
  101.     
  102.  
  103.     
  104.     
  105.