home *** CD-ROM | disk | FTP | other *** search
/ Black Box 4 / BlackBox.cdr / dosutils / retmod4.arj / RETMOD.DOC < prev    next >
Encoding:
Text File  |  1991-06-29  |  3.6 KB  |  85 lines

  1. RETMOD - Batch file system to run a program from any drive and directory
  2. ------------------------------------------------------------------------
  3. It is often useful to be able to run software without having to change the
  4. logged in drive and directory first.  Then after leaving the program the user
  5. should be returned to the original drive and directory, with all directories
  6. set as they were originally.  This system provides an efficient new way to do
  7. this and uses no memory to do it.
  8.  
  9. The Past
  10. --------
  11. Up to now there have been four ways to run a program:
  12.  
  13. 1. Log into the correct drive, then change directories to the correct
  14. directory, then type the program name.  After leaving the program, change the
  15. directory back and then log in to the original drive.  This works well but is
  16. inconvenient.
  17.  
  18. 2. Put the directory on the DOS path.  This works well for simple utilities but
  19. has several disadvantages:
  20. - The path needed can get longer and longer as additional software is
  21. installed.
  22. - Some programs which use overlays or other data files cannot find the
  23. necessary files and fail to work correctly.
  24. - Some programs can cope with this only if environment variables have been set
  25. to tell the program where its files are located.  This leads to problems with
  26. setting these variables correctly, conflicting variable names between different
  27. packages, and running out of environment space.
  28.  
  29. 3. Write a simple batch file to change to the correct drive and directory and
  30. run the program.  The problem is that after leaving the program the user is not
  31. returned to the original location, and has to do this manually.
  32.  
  33. 4. Run a TSR program that stores the current location and restores it
  34. afterwards.  This has the disadvantages that memory is used to run the program,
  35. the program may conflict with other software, and the directory of the drive
  36. the software is on, if this is different, may be changed and not restored.
  37.  
  38. Functions
  39. ---------
  40. 1. Runs any software from any drive and directory and automatically returns to
  41.    the original drive and directory afterwards.
  42. 2. Leaves the default directory on the drive containing the software unchanged
  43.    afterwards.
  44. 3. Allows the software to be run by entering a single command.
  45.  
  46. Installation
  47. ------------
  48. This archive contains the following files:
  49. RETMOD.DOC       This file.
  50. RETMOD.BAT       Batch file which does the work.
  51. RETMOD.PAT       Debug patch file used by RETMOD.BAT.
  52.  
  53. Requires DOS 3.3 or later.
  54.  
  55. 1. Copy RETMOD.PAT to the directory containing the software to be run.
  56. 2. Copy RETMOD.BAT to a directory on your DOS path.
  57. 3. Ensure that DEBUG (which comes with DOS) is on your path.
  58. 4. Create a one line batch file, located on your DOS path, containing one line
  59.    of the form:
  60. RETMOD drive directory program %1 %2 %3 %4 %5 %6
  61. When using the batch file, up to six parameters will be passed to the program.
  62. Note that the directory is not allowed to be the root directory.
  63.  
  64. Example
  65. -------
  66. Suppose the directory c:\bat is on the DOS path and contains batch files.
  67. Suppose that the DOS files are in c:\dos.
  68. The software to be run is on drive D, in directory \ody and the program is
  69. called ody.exe.
  70. 1. Copy RETMOD.PAT to d:\ody
  71. 2. Copy RETMOD.BAT to c:\bat
  72. 3. Check that DEBUG is in c:\dos
  73. 4. Create a file called say ODRET.BAT in c:\bat and put in it the one line:
  74. RETMOD d: \ody ody %1 %2 %3 %4 %5 %6
  75.  
  76. Now to run the software just type ODRET.  Everything will be done
  77. automatically.
  78.  
  79. Comments
  80. --------
  81. Do not try to alter it in any way without fully understanding how it works.
  82. Please send any comments to rtrue at CIX.
  83. 29 June 1991
  84.  
  85.