home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / n / nt_drv.exe / INSTALL.BAT < prev    next >
DOS Batch File  |  1993-02-23  |  2KB  |  84 lines

  1. @echo off
  2.  
  3. REM Give help if needed
  4. if "%1" == "/?" goto LHelp
  5. if "%1" == "-?" goto LHelp
  6. if "%1" == "-help" goto LHelp
  7. if "%1" == "-HELP" goto LHelp
  8. if "%1" == "/help" goto LHelp
  9. if "%1" == "/HELP" goto LHelp
  10.  
  11. REM Check that we are running under NT
  12. if "%WinDir%" == "" goto ENotNT
  13. if "%username%" == "" goto ENotNT
  14.  
  15. REM Hello mesage
  16. echo Logitech mouse drivers installation.
  17. echo This batch file installs a Windows NT BUS and Serial mouse drivers.
  18. echo To get help, type: INSTALL /help
  19. echo Press Ctrl-C to stop or ...
  20. pause
  21.  
  22. REM Start the installation
  23. echo Start installation
  24.  
  25. set _DRVINI=install.ini
  26. if not exist regmod.exe goto ENoReg
  27. if not exist %_DRVINI% goto ENoINI
  28.  
  29. REM Check and set the environment
  30. set _DRIVER=BusMouse.sys
  31. set _DRVBAK=BusMouse.bak
  32. set _DRVDIR=%WinDir%\system\drivers
  33. if not %_DRVDIR% == %WinDir%\system\drivers goto ENoEnv
  34. if not exist copydrv.bat goto ENoCopy
  35. call copydrv.bat
  36.  
  37. REM Check and set the environment
  38. set _DRIVER=SerMouse.sys
  39. set _DRVBAK=SerMouse.bak
  40. set _DRVDIR=%WinDir%\system\drivers
  41. if not %_DRVDIR% == %WinDir%\system\drivers goto ENoEnv
  42. if not exist copydrv.bat goto ENoCopy
  43. call copydrv.bat
  44.  
  45. REM Update the registry
  46. echo Updating the registry
  47. regmod %_DRVINI% > NUL
  48. echo Registry updated
  49.  
  50. REM Cleanup
  51. set _DRIVER=
  52. set _DRVINI=
  53. set _DRVBAK=
  54. set _DRVDIR=
  55.  
  56. REM Goodbye
  57. echo Installation completed.
  58. goto End
  59.  
  60. :ENoCopy
  61. echo ERROR: Cannot find CopyDrv.bat file.
  62. goto End
  63.  
  64. :ENoEnv
  65. echo ERROR: Not enough environment space.
  66. goto End
  67.  
  68. :ENotNT
  69. echo ERROR: This batch file must be run under Windows NT
  70. goto End
  71.  
  72. :ENoReg
  73. echo ERROR: Cannot access the RegMod.exe file.
  74. goto End
  75.  
  76. :ENoINI
  77. echo ERROR: Cannot find the %_DRVINI% file.
  78. goto End
  79.  
  80. :LHelp
  81. type readme.txt | more
  82.  
  83. :End
  84.