home *** CD-ROM | disk | FTP | other *** search
/ The Best of Select: Windows 95 Special 2 / CD_1.iso / utils / envelop / envelop.1 / distrib.bat next >
DOS Batch File  |  1996-07-08  |  3KB  |  93 lines

  1. @echo off
  2. REM
  3. REM File: DISTRIB.BAT
  4. REM
  5. REM A little batch file to make directory [envelop]\DISTRIB, where [envelop]
  6. REM is the directory Envelop was installed to (C:\ENVELOP by default).
  7. REM
  8. REM Copy this file to the [envelop]\PROGRAM directory, CD to that directory,
  9. REM and run this script to make the DISTRIB directory. If the DISTRIB
  10. REM directory already exists, or if curren directory is not PROGRAM,
  11. REM then this script exits with an error message.
  12. REM
  13. REM The [envelop]\DISTRIB directory will contain the minimal set of
  14. REM files to support most typical Envelop applications. To distribute
  15. REM an application to a computer that does not already have Envelop
  16. REM installed:
  17. REM   1) Copy the files from the DISTRIB directory (and subdir SYS too).
  18. REM   2) Copy the application's modules (.EBO) and executable (.EXE) files.
  19. REM   3) Ensure the files from the DISTRIB\SYS directory are copied to
  20. REM      the SYSTEM32 (NT) or SYSTEM (95) directory on the target machine,
  21. REM      under the Windows system directory.
  22. REM   4) Ensure the entries from ENVELOP.REG are in the registry on
  23. REM      the target machine. Either double-click this file from
  24. REM      File Manager or Explorer, or run REGEDIT ENVELOP.REG.
  25. REM   5) If your application files are not in the same directory that
  26. REM      contains the DISTRIB files (on the target machine), then ensure
  27. REM      that the target machine's DISTRIB directory is in the PATH.
  28. REM
  29. if not exist .\evstore.dll goto ERROR_NO_ENVELOP
  30. if exist ..\DISTRIB\NUL goto ERROR_DISTRIB_EXISTS
  31. cd ..
  32. md distrib
  33. copy program\ou*.dll distrib
  34. copy program\ms*.dll distrib
  35. copy program\ev*.dll distrib
  36. copy program\od*.dll distrib
  37. copy program\*.reg   distrib
  38. copy program\*.ebo   distrib
  39. del  distrib\evdev.dll
  40. del  distrib\evmaged.dll
  41. del  distrib\dbtools.ebo
  42. del  distrib\envelop.ebo
  43. del  distrib\evhelp.ebo
  44. del  distrib\options.ebo
  45.  
  46. REM
  47. REM The files copied to DISTRIB\SYS must be installed in the target
  48. REM computer's SYSTEM32 (NT) or SYSTEM (95) directory, under the
  49. REM Windows directory.
  50. REM
  51. md distrib\sys
  52. if not "%SystemRoot%" == "" goto SYS_WINNT
  53. if not "%windir%" == "" goto SYS_WIN95
  54. goto ERROR_UNKNOWN_CONFIG
  55. :SYS_WINNT
  56. set SYSSRC=%SystemRoot%\system32
  57. goto SYS_COPY
  58. :SYS_WIN95
  59. set SYSSRC=%windir%\system
  60. :SYS_COPY
  61. if not exist %SYSSRC%\ivsql08.dll goto ERROR_NO_SYSFILES
  62. copy %SYSSRC%\ctl3d32.dll  distrib\sys
  63. copy %SYSSRC%\cw3215.dll   distrib\sys
  64. copy %SYSSRC%\odbc32.dll   distrib\sys
  65. copy %SYSSRC%\odbccp32.dll distrib\sys
  66. copy %SYSSRC%\ivlib.dll    distrib\sys
  67. copy %SYSSRC%\ivsql08.dll  distrib\sys
  68. copy %SYSSRC%\ivutl08.dll  distrib\sys
  69. copy %SYSSRC%\ivbas08.dll  distrib\sys
  70. copy %SYSSRC%\ivflt08.dll  distrib\sys
  71.  
  72. goto DONE
  73.  
  74. :ERROR_NO_ENVELOP
  75. echo ERROR: Could not find PROGRAM\evstore.dll
  76. echo Run this batch file from the directory Envelop was installed to.
  77. goto DONE
  78.  
  79. :ERROR_DISTRIB_EXISTS
  80. echo ERROR: Directory DISTRIB already exists. Please remove it and try again.
  81. goto DONE
  82.  
  83. :ERROR_UNKNOWN_CONFIG
  84. echo ERROR: Cannot determine whether your system is running WinNT or Win95.
  85. echo        Unable to copy system files needed.
  86. goto DONE
  87.  
  88. :ERROR_NO_SYSFILES
  89. echo ERROR: Cannot find system files needed.
  90. goto DONE
  91.  
  92. :DONE
  93.