home *** CD-ROM | disk | FTP | other *** search
/ Total Meltdown / dukenukemtotalmeltdown.img / util / gamephon / install.bat < prev    next >
DOS Batch File  |  1996-03-04  |  3KB  |  85 lines

  1. @echo off
  2.  
  3. rem First verify that the script command line is valid.
  4. if NOT %0==install goto currentdir
  5. if "%1"=="" goto usage
  6. if "%1"=="-?" goto usage
  7. if "%1"=="/?" goto usage
  8. if NOT "%2"=="" goto tomanyparam
  9.  
  10. rem Now make sure that script is run from the install directory.
  11. rem In other words, the files to be installed are in the current directory.
  12. if NOT EXIST sersetup.exe goto noserial
  13. if NOT EXIST commit.exe goto nocommit
  14. if NOT EXIST allmodem.str goto nomodem
  15.  
  16. rem Now figure out which program we are installing for.
  17. if EXIST %1\duke3d.exe goto doduke
  18. if EXIST %1\doom.exe goto dodoom
  19. if EXIST %1\doom2.exe goto dodoom
  20.  
  21. echo Could not find doom.exe, doom2.exe, or duke3d.exe in the specified
  22. echo directory.  GamePhones installation aborted.
  23. goto done
  24.  
  25. :dodoom
  26. if EXIST %1\sersetup.bak goto doomalreadyinstalled
  27. copy %1\sersetup.exe %1\sersetup.bak
  28. copy sersetup.exe %1\sersetup.exe
  29. copy allmodem.str %1\allmodem.str
  30. echo GamePhones successfully installed to %1
  31. goto done
  32.  
  33. :doomalreadyinstalled
  34. echo A sersetup.bak file already exists in %1
  35. echo Has Echo GamePhones already been installed?
  36. echo If not, then please delete the sersetup.bak file.
  37. echo GamePhones installation aborted.
  38. goto done
  39.  
  40. :doduke
  41. if EXIST %1\commit3d.exe goto dukealreadyinstalled
  42. copy %1\commit.exe %1\commit3d.exe
  43. copy commit.exe %1\commit.exe
  44. copy allmodem.str %1\allmodem.str
  45. echo GamePhones successfully installed to %1
  46. goto done
  47.  
  48. :dukealreadyinstalled
  49. echo A commit3d.exe file already exists in %1
  50. echo A version of Echo GamePhones has already been installed!
  51. echo Please run the remove.bat file before rerunning this install.bat file.
  52. echo GamePhones installation aborted.
  53. goto done
  54.  
  55. :nocommit
  56. echo The commit.exe file is not in the current directory.
  57. echo Please run install from the directory that contains the files to install.
  58. echo GamePhones installation aborted.
  59. goto done
  60.  
  61. :noserial
  62. echo The sersetup.exe file is not in the current directory.
  63. echo Please run install from the directory that contains the files to install.
  64. echo GamePhones installation aborted.
  65. goto done
  66.  
  67. :nomodem
  68. echo The allmodem.str file is not in the current directory.
  69. echo Please run install from the directory that contains the files to install.
  70. echo GamePhones installation aborted.
  71. goto done
  72.  
  73. :tomanyparam
  74. echo To many parameters.
  75. goto usage
  76.  
  77. :currentdir
  78. echo You must run install from inside its own directory.
  79.  
  80. :usage
  81. echo usage: install thefullpathtothegamedirectory  ex: install c:\duke3d
  82.  
  83. :done
  84.  
  85.