home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 21 / CD_ASCQ_21_040595.iso / dos / prg / c / freedos3 / source / swsubst / swsubst.eng < prev    next >
Encoding:
Text File  |  1994-12-21  |  26.3 KB  |  747 lines

  1. $Id: SWSUBST.ENG 2.0 1994/12/21 09:16:02 ska Rel ska $
  2.  
  3. This is the documentation for SWSUBST.EXE.
  4. Eine deutsche Version dieses Textes befindet sich in SWSUBST.TXT.
  5.  
  6. Note:
  7. ++ To use relative paths may cause unexpected results.
  8. ++ Non-existing paths may force the system into a Dead Lock.
  9. ++ Networked drives are usable in particular only.
  10. ++ Do not use SWSUBST within multi-tasking environments, such as
  11.    MS-Windows. Noone knows, what happens there.
  12. ++ MS-Windows v3.11 (for Workgroups) handles hard drives as networked.
  13.    Therefore, MS Windows resets 32-bit access, when there is a
  14.    SUBST'ed or JOIN'ed drive.
  15. ++ Because of different CDS this program cannot run on mostly every
  16.    non-Microsoft DOS, including DR-DOS.
  17. ++ You need at least DOS version 3.00 to allow the basic functions.
  18. ++ "Physical paths" means a path, which bypasses any SUBST or JOIN
  19.    definition, but not ASSIGN.
  20. ++ The physical path of networked drives cannot be generated by SWSUBST.
  21. ++ If the executable is renamed to "JOIN", it acts like JOIN rather than
  22.    SUBST.
  23.  
  24.  
  25. Short describtion:
  26. The program SWSUBST:
  27. - replaces and extends the DOS statements SUBST and JOIN;
  28. - swaps two logical drives;
  29. - breaks all SUBST/JOIN relations within a single command;
  30. - make a full path including the necessary direcories above;
  31. - allows direct change and testing of the logical drive flags;
  32. - lists and searches in the MCB chain and the installed devices;
  33. - accept drives via the driver namens or the volume labels.
  34. - allows multi-linugual by adding new text files.
  35.  
  36.  
  37. Garantien:
  38. SWSUBST ist Freeware; es muß weder Entgeld entrichtet noch eine
  39. Registrierung durchgeführt werden. Es darf weitergegeben werden, solange
  40. alle drei Dateien zusammen und unverändert, Ausnahme siehe "Neue Texte
  41. einbringen", bleiben. Der Weitergebende darf in keiner Weise davon
  42. profitieren.
  43.  
  44. Der Autor von SWSUBST kann für keinerlei Schäden haftbar gemacht werden.
  45. Hierbei ist unerheblich, ob die Schäden direkt oder indirekt entstehen
  46. oder ob auf die Möglichkeit einer Schädigung hingewiesen wurde, oder
  47. nicht.  Das Programm SWSUBST darf nur auf eigene Gefahr genutzt werden.
  48.  
  49. Disclaimer
  50.  
  51. In no event will the Author be liable to users for any damages, including 
  52. but not limited to any lost profits, lost savings or other incidental or 
  53. consequential damages arising out of the use or the inability to use this 
  54. program, even if the Author has been advised of the possibility of such 
  55. damages, or for any claim by other party. 
  56.  
  57.  
  58. SWSUBST is FreeWare; there is no charge for using it and it may be
  59. distributed freely so long as the files are kept together and unaltered,
  60. except see "Including of new Texts". You may neither sell nor profit
  61. from distribution of SWSUBST in any way.
  62.  
  63.  
  64.  
  65. Contents:
  66. - Files in the Package
  67. - Usage of the Program
  68. - Options
  69. - Commands
  70. - Environment variables
  71. - Diffrences to MS-DOS's SUBST and JOIN
  72. - Including of new Texts
  73. - The Author
  74.  
  75.  
  76.  
  77. Files in the Package:
  78. SWSUBST.EXE    Program
  79. SWSUBST.TXT    Program describtion in German
  80. SWSUBST.ENG    Program describtion in English
  81. SWSUBST.LNG Supported Languages
  82.  
  83.  
  84. Usage of the Program:
  85.  
  86. SWSUBST [ {option} ] [command]
  87.  
  88. Options:
  89.  
  90. - Options can be associated with every command, even the command is not
  91.   effected by the particular option.
  92. - Options cannot be combined together, but there's no fixed order they
  93.   have to follow each other.
  94. - Environment variables may contain special options.
  95.  
  96.  
  97. The general form each options is:
  98.     /[+-]?*[!]
  99.  
  100. where .. stands for:
  101. /    the slash to mark the parameter as option
  102. [+-] an optional plus or minus. Normally options toggles between the two
  103.      states "off" and "on". In the beginning all options are "off", e.g.
  104.      '/a' toggles option "a" to "on", during '/a /a' toggles option "a"
  105.      to "on" first, and then to "off" back.  '/+a' sets option "a" to
  106.      "on", '/-a' to "off".  If either the plus or the minus given, [!]
  107.      is ignored.
  108. ?    the character (s. below) representing the option.
  109. *    any (including none) character, which are ignored; e.g. '/a' is equal
  110.     to '/aaaaa', '/a09384809,//.,' but NOT '/aa!'.
  111. [!] an optional exclamation mark at the far end of the option. This
  112.     activates the special meaning of the option, and is ignored, if
  113.     the option does not have one. The special meaning is
  114.     deactivated, when the option is used for another time; e.g. '/a!
  115.     /a /a' enables option "a" and activates the special meaning of
  116.     "a", then the option is disabled, then enabled again, but
  117.     without the special meaning activated.
  118.  
  119. Option characters:
  120. #: Below the CDS table the number of JOIN'ed drives shall be displayed.
  121.    One number is derived from the number of setted flags "JOIN" within
  122.    the CDS, the second is the copy of the "Number of Joined Drives" flag
  123.    fromout the DOS varables area.
  124.    Special meaning: If both numbers differ, set the flag to the counted
  125.    number.
  126. a: After executing the command the CDS table shall be displayed; it is
  127.    ignored for the commands '/l' and '/m'.
  128. f: In several places names could be placed. SWSUBST supposes, the names
  129.    are correct, when the characters comes fromout the range from ASCII 32 to
  130.    ASCII 126; that means any printable 7 bit character (no umlauts,
  131.    greek letters, and graphical signs).
  132.    If this option is set to "on", the full name is supposed to be valid.
  133.    When a character does not fit into the range, it is displayed in the
  134.    hexadecimal form: "\x??", ?? stands for the ASCII value of the character
  135.    and is always two characters wide.
  136. c: Creating of the specified path within the "/u" and "/j" commands is
  137.    the purpose of this option. If the path cannot be created and does
  138.    not exist, a error message occurs. This option is a little bit
  139.    dangerous, because the physical paths must be handled here, which are
  140.    possibly not valid at the moment, so the path is created on a false
  141.    drive or in a false directory.
  142.    Special meaning: Within the "/u" command (SUBST) the path is not
  143.    created, only checked.
  144. _: All driver attributes, even the one without a (documented) meaning,
  145.    shall be viewed within the CDS table.
  146.  
  147.  
  148. Commands:
  149.  
  150. Available Commands:
  151. Command  1)
  152. Command  2) dr:{<op><flag>}
  153. Command  3) /w dr
  154. Command  4) /s dr1 dr2
  155. Command  5) /u dr [-]path
  156. Command  6) /j dr [-]path
  157. Command  7) /l[!] [device]
  158. Command  8) /m[!] [name]
  159. Command  9) -
  160. Command 10) --
  161. Command 11) /d dr   or  dr -
  162. Command 12) dr [-]path
  163. Command 13) /k [-]path
  164. Command 14) /q lw:{<op><flag>}
  165.  
  166.  
  167. The general form of commands is identical with the one of options, but
  168. [+-] is not allowed. Abbreviated, "/?" is used further.
  169.  
  170. The Use of Drive Letters:
  171. The drive specification is normally '?:', where
  172. "?" is the drive letter. For abbreviating purpose, the colon ":" may be
  173. omitted, e.g. 'a:' and 'a' are identical. 
  174. Some device drivers place their name into an unused area. That name
  175. can be used to identify the drive, too. The syntax is ':???:', where
  176. the driver name starts with ??? regardless of the upper/lower case, e.g.
  177. driver "DRIVR-1" is accessable through ':drivr-1:', ':driv:', or even
  178. ':d:'.
  179.  
  180. If two or more drivers have the same name, they are numbered started
  181. from drive A and number 0, e.g.
  182.     A 011c:136a ... .... PHYS ..... A:"\
  183.         ==>.DRIVER.<==
  184.     B 011c:138b ... .... PHYS ..... B:"\
  185.         ==>.DRIVER.<==
  186.     C 011c:13ac ... .... PHYS ..... C:"\CC\SWSUBST
  187.         ==>.DRIVER.<==
  188.     D 011c:13ac ... .... PHYS SUBST C:\CC\SWSUBST"\TEST
  189.     E 0000:0000 NET .... PHYS ..... \\E.\A."
  190.         ==>.MSCD001 .<==
  191. Drive A: can be accessed via ':d:', ':dr:' etc.,
  192. drive B: via ':1:d:', ':1:dr:' etc.,
  193. drive C: via ':2:d:' etc.
  194. In the table, the dots '.' are placed by the program behind the '>'
  195. and before the '<' and may not used in the driver name. 
  196. Note: Spaces are used to separate the program parameters, so spaces
  197. inside the drive names are not legal.
  198.  
  199. Another possible generation for drive letters is by searching for a
  200. volume label. The form is: '::...:' or  ':-:...:', where '...' stands
  201. for the beginning of the label. If the dash '-' is present, SUBST and
  202. JOIN relations are broken for the test.
  203. Note: The form ':-:...:' do not imply, that the path is interpreted 
  204. physically.
  205.  
  206.  
  207. Command 1)
  208.  
  209. without command
  210.  
  211. Displays all installed drive letters (by LASTDRIVE in CONFIG.SYS).
  212.  
  213. The following output is generated: (e.g.)
  214. A 011c:136a ... .... PHYS ..... ...... A:"\
  215.     _-P--------------_
  216. B 011c:138b ... .... PHYS ..... ...... B:"\
  217.     _-P--------------_
  218. C 011c:13ac ... .... PHYS ..... ...... C:"\CC\SWSUBST
  219.     _-P--------------_
  220. D 011c:13cd ... .... PHYS ..... ...... D:"\
  221.     _-P--------------_
  222. E 0000:0000 ... .... .... ..... ...... E:"\
  223.     _----------------_
  224. F 0000:0000 ... .... .... ..... ...... F:"\
  225.     _----------------_
  226. G 0000:0000 NET .... PHYS ..... HIDDEN \\G.\A."
  227.     ==>.MSCD001 .<==    _NP------H-------_
  228.  
  229. First of all: there are five installed drive letters A: through E:.
  230.  
  231. The columns have following signification:
  232. 1 - Logical drive letter. That's the letter DOS users need to access a
  233.     drive.
  234. 2 - Address of the Disk Parameter Block (DPB), which describes the drive
  235.     in the physical way.
  236. 3 - NET: states, that the drive is networked, possibly integrated by the
  237.     Network Redirector, e.g. CD-ROM.
  238. 4 - JOIN: The physical drive is integrated into the directory tree of
  239.     another drive.
  240. 5 - PHYS: This is always setted and marks the drive as accessible. Even
  241.     at non-physical drives, like DoubleSpace drives, this flag is set.
  242. 6 - SUBST: The logical drive points into a path of another drive.
  243. 7 - HIDDEN: A flag to hide the drive from network drivers(?).
  244. 8 - Physical path: The drive letter should not be mixed up with the
  245.     logical drive letter. Here the drive letter indicates:
  246.         A: first floppy disk drive
  247.         B: second floppy disk drive
  248.         C: primary partition of the first hard disk
  249.         D: primary partition of the second hard disk
  250.         E-?: the other partitions of the first hard disk
  251.         ?-?: the other partitions of the second hard disk
  252.  
  253.     The character '"' is no part of the path itself, it indicates the point
  254.     of the root directory, e.g.
  255.         C The logical path "C:\" is equal to the physical path "C:\".
  256.         D The logical Path "D:\" is equal to the physical path
  257.             "C:\CC\SWSUBST".
  258.  
  259.     The string behind the character '"' stands for the actual path,
  260.     relative to the root directory, e.g. "D:\TEST" und "C:\CC\SWSUBST".
  261.  
  262. If the device driver placed a name in the unused area, the name
  263. will be displayed in the line below, like
  264.     ==>.???.<==
  265. where ??? is the driver name. The length is seven or eigth in maximum.
  266.  
  267. Right at that name or at the line alone the attributes are placed, if
  268. option "/_" is ON, e.g.:
  269. _-P--------------_
  270. Known attributes are marked with their first letter, if they are set.
  271. Unknown attributes are marked with '+'; if the attribute is not set, a
  272. dash '-' is placed. The underscores '_' left and right are always
  273. placed.
  274.  
  275.  
  276.  
  277. Command 2) dr:{<op><flag>}
  278.  
  279. Changes the flags (columns 3 through 6) of drive dr. <flag> can be one
  280. out of: PHYSICAL, JOIN, SUBST, NETWORK or HIDDEN (case-insensitive,
  281. abbreviated to a minimum of one character) or an one or two digit wide
  282. decimal number. The number zero indicates the rightmost attribute.
  283. <op> may be either '+' for set, '-' for unset, or '=' for set & unset
  284. all others.
  285.  
  286. e.g.:
  287.  
  288.     A 011c:136a ... .... PHYS ..... A:"\
  289.     B 011c:138b ... .... PHYS ..... B:"\
  290.     C 011c:13ac ... .... PHYS ..... C:"\CC\SWSUBST
  291.     D 011c:13ac ... .... PHYS SUBST C:\CC\SWSUBST"\TEST
  292.     E 0000:0000 NET .... PHYS ..... \\E.\A."
  293.         ==>.MSCD001 .<==
  294. and
  295.     SWSUBST a=j+s
  296.  
  297. results:
  298.  
  299.     A 011c:136a ... JOIN .... SUBST A:"\
  300.     B 011c:138b ... .... PHYS ..... B:"\
  301.     C 011c:13ac ... .... PHYS ..... C:"\CC\SWSUBST
  302.     D 011c:13ac ... .... PHYS SUBST C:\CC\SWSUBST"\TEST
  303.     E 0000:0000 NET .... PHYS ..... \\E.\A."
  304.         ==>.MSCD001 .<==
  305.  
  306. and
  307.     SWSUBST a=network=join=phys
  308.  
  309. results:
  310.  
  311.     A 011c:136a ... .... PHYS ..... A:"\
  312.     B 011c:138b ... .... PHYS ..... B:"\
  313.     C 011c:13ac ... .... PHYS ..... C:"\CC\SWSUBST
  314.     D 011c:13ac ... .... PHYS SUBST C:\CC\SWSUBST"\TEST
  315.     E 0000:0000 NET .... PHYS ..... \\E.\A."
  316.         ==>.MSCD001 .<==
  317.  
  318. There are to special flags 'OFF' and 'ON'.
  319. OFF disables the drive by unsetting all flags, store 0 as the address of
  320. the DPB and reset the physical path to the root directory. An operator
  321. <op> is required but ignored.
  322. ON must ever be written with 2 letters and enables the drive.
  323. 'SWSUBST ?:=ON' is equal to 'SWSUBST ? -'. The flag PHYS is set, the DPB
  324. is searched and the physical path is set to "?:\". 'SWSUBST ?:=OFF=ON'
  325. need not leave drive ?: as it was before.
  326.  
  327.  
  328.     A 011c:136a ... .... PHYS ..... A:"\
  329.     B 011c:138b ... .... PHYS ..... B:"\
  330.     C 011c:13ac ... .... PHYS ..... C:"\CC\SWSUBST
  331.     D 011c:13ac ... .... PHYS SUBST C:\CC\SWSUBST"\TEST
  332.     E 0000:0000 NET .... PHYS ..... \\E.\A."
  333.         ==>.MSCD001 .<==
  334. and
  335.     SWSUBST d:=off
  336.  
  337. results:
  338.  
  339.     A 011c:136a ... .... PHYS ..... A:"\
  340.     B 011c:138b ... .... PHYS ..... B:"\
  341.     C 011c:13ac ... .... PHYS ..... C:"\CC\SWSUBST
  342.     D 0000:0000 ... .... .... ..... D:"\
  343.     E 0000:0000 NET .... PHYS ..... \\E.\A."
  344.         ==>.MSCD001 .<==
  345.  
  346.  
  347.  
  348. Command 3) /w dr
  349. "which"
  350.  
  351. Returns the number of the drive in ERRORLEVEL and produce no further
  352. output.
  353.  
  354. ERRORLEVEL == 65 => A:
  355.               66 => B:
  356.             ...    ...
  357.  
  358. ERRORLEVEL == 1 => drive does not exist.
  359.  
  360. This function might be ingeniously used for map a driver name to its
  361. drive letter or to check, how many drive letters are installed via the
  362. LASTDRIVE statement within CONFIG.SYS.
  363.  
  364. The numbers ranges from 65 (ASCII 'A'), because several DOS command
  365. processors, like COMMAND.COM, use an ERRORLEVEL from 1 through 12, if
  366. the load of the program failed.
  367.  
  368.  
  369.  
  370. Command 4) /s dr1 dr2
  371. "swap"
  372.  
  373. Swap the entries of the drives dr1 and dr2.
  374.  
  375.         A 011c:136a ... .... PHYS ..... A:"\
  376.         B 011c:138b ... .... PHYS ..... B:"\
  377.         C 011c:13ac ... .... PHYS ..... C:"\CC\SWSUBST
  378.         D 011c:13ac ... .... PHYS SUBST C:\CC\SWSUBST"\TEST
  379.         E 0000:0000 NET .... PHYS ..... \\E.\A."
  380.             ==>.MSCD001 .<==
  381.  
  382.     and 
  383.         SWSUBST /s a c
  384.  
  385.     results:
  386.  
  387.         A 011c:13ac ... .... PHYS ..... C:"\CC\SWSUBST
  388.         B 011c:138b ... .... PHYS ..... B:"\
  389.         C 011c:136a ... .... PHYS ..... A:"\
  390.         D 011c:13ac ... .... PHYS SUBST C:\CC\SWSUBST"\TEST
  391.         E 0000:0000 NET .... PHYS ..... \\E.\A."
  392.             ==>.MSCD001 .<==
  393.  
  394.  
  395. Command 5) /u dr [-]path
  396. "subst"
  397.  
  398. Substitute path to the drive letter dr, as DOS SUBST statement does.
  399. The parameters must have following format:
  400.  
  401. dr - See above section "The Use of Drive Letters" Networked drives are
  402.      rejected; if the drive is already SUBST'ed or JOIN'ed, this
  403.      relation is boken off.
  404.  
  405. path - The path to which the drive shall point to.
  406.  
  407.        Is path either "-" or "/d" or "-?:\", where "?" is the drive
  408.        letter dr, previous SUBST or JOIN relations are broken off and
  409.        not reinstalled.
  410.  
  411.        If path is precided by a dash "-", path will not processed by
  412.        the DOS function "truename", instead it is made absolute. 
  413.        Because of the different syntax of networked drives, any string
  414.        behind a double dash '--' is not interpreted at all, as a path
  415.        starting with a double backslash '\\'.
  416.  
  417.         A 011c:136a ... .... PHYS ..... A:"\
  418.         B 011c:138b ... .... PHYS ..... B:"\
  419.         C 011c:13ac ... .... PHYS ..... C:"\CC\SWSUBST
  420.         D 011c:13ac ... .... PHYS SUBST C:\CC\SWSUBST"\TEST
  421.         E 0000:0000 NET .... PHYS ..... \\E.\A."
  422.             ==>.MSCD001 .<==
  423.  
  424.        "SWSUBST a: d:\test" substitutes drive A: to point to 
  425.        "C:\CC\SWSUBST\TEST"; whereas "SWSUBST a: -d:\test" substitutes
  426.        A: to "D:\TEST".
  427.  
  428.        The dash prevents probing the floppy disk drives while making
  429.        a relative path absolute, e.g.
  430.            SWSUBST a b:
  431.        prompts for Retry/Ignore/Abort, if no floppy has inserted
  432.        into that drive.
  433.            SWSUBST a -b:\
  434.        does not.
  435.  
  436.        Both possibilities differ, so DOS SUBST support the dash-less
  437.        version only· Therefore, it cannot create a new SUBST
  438.        pointing to physical drive D:
  439.  
  440.        ATTENTION: Relative paths may cause unexpected results, chæck below:
  441.                        SWSUBST a: -d:
  442.                      is equal to 'SWSUBST a: -d:\test'. The physical path is 
  443.                      absoluted by logical path components.
  444.  
  445.            By default, SWSUBST do not check for the existens of the path.
  446.            The access of non-existing paths may force DOS into a Dead Lock.
  447.         SWSUBST checks or creats the path, when option "a" is "on".
  448.  
  449.            The command '? -?:\', where '?' is the same drive letter, has a
  450.            special purpose. It is equal to '? /d' and breaks any previous
  451.            SUBST'ing or JOIN'ing.
  452.  
  453.  
  454. Command 6) /j dr [-]path
  455. "join"
  456.  
  457.     is similar to Command 5), but the path is not SUBST'ed rather than
  458.     JOIN'ed, that means, the access drive dr via path.
  459.  
  460.  
  461. Command 7) /l[!] [device]
  462. "list"
  463.  
  464. When device is omitted, all installed devices including their names
  465. out of the driver header are outputted. In DOS 5+ the name of the
  466. executable is printed, too; e.g.
  467.  
  468. NUL     
  469. IFS$HLP$ <<D>> IFSHLP  
  470. CON      <<D>> EANSI   
  471. MSCD001  <<D>> SGCDU   
  472. EMMXXXX0 <<D>> EMM386  
  473. XMSXXXX0 <<D>> HIMEM   
  474. SETVERXX <<D>> SETVER  
  475. CON     
  476. AUX     
  477. PRN     
  478. CLOCK$  
  479. COM1    
  480. LPT1    
  481. LPT2    
  482. LPT3    
  483. COM2    
  484. COM3    
  485. COM4    
  486.  
  487. If the "<< >>" contains the letter 'D', the name behind is likely correct.
  488.  
  489. When device is permitted, the list is searched for that name starting
  490. with device. The case is ignored. The command sets ERRORLEVEl to zero,
  491. when a matching driver name was found, else to a greater number.
  492. The special meaning: The names after "<< >>" are searched, too.
  493.  
  494.  
  495. Command 8) /m[!] [name]
  496. "mcb"
  497.  
  498. If name is omitted, this command displays the MCB chain including
  499. the MCB chain in the UMB's and tries to display any chain in a single
  500. memory block, too; e.g.
  501.  
  502. 0x025b M SD system_data
  503.     0x025c D KEYBUFX  drv=KEYB-X   system_device
  504.     0x0281 D SETVER   drv=SETVERXX system_device
  505.     0x02a6 D HIMEM    drv=XMSXXXX0 system_device
  506.     0x02ef D EMM386   drv=EMMXXXX0 system_device
  507.     0x03b3 D IFSHLP   drv=IFS$HLP$ system_device
  508.     0x04a5 F *  system_files
  509.     0x0528 X   system_fcbs
  510.     0x052e B   system_buffers
  511.         0x052f M  0x5b5a
  512.     0x054f L   system_lastdrive
  513.         0x0550 A  0x5c3a
  514. 0x057c M SC system_code
  515. 0x0581 M  COMMAND
  516.     0x0582 C ommEMM 0x4e4f
  517. 0x0585 M COMMAND 
  518. 0x0647 M drort env=COMMAND
  519. 0x0688 M  env=SWSUBST
  520. 0x06a3 M SWSUBST 
  521. 0x9fff M SC system_code
  522. 0xb159 M SD system_data
  523.     0xb15a D EANSI    drv=CON      system_device
  524. 0xb7fe M SC system_code
  525.     0xb7ff M SM       system_memory
  526.     0xd800 Z UMB      
  527. 0xd801 M SMARTDRV 
  528.  
  529. The format is:
  530. 0. The spacing illustrates, if the block is placed within the block
  531.    above.
  532. 1. Address of the memory block in hexadecimal form.
  533. 2. type of the memory block.
  534. 3. name of the program, which allocated this block. DOS 5 places the
  535.    name while program loading only; therefore, this item may be empty or
  536.    absurd (see 0x0688 or 0x054f).
  537. 4. name of the program to whom the memory block is associated.  Drivers
  538.    starts with "drv=" and environment with "env=". The hexadecimal form
  539.    "0x<#>" is used, when there is no associated program (what means,
  540.    that this is no MCB or your MCB chain is broken).
  541. 5. the trial to guess the sense of the memory block (starting with
  542.    "system_").
  543.  
  544. The special meaning: First, between the type of the memory block and its
  545. name the length is placed in units to 1 paragraph (16 byte). And second,
  546. the name is enclosed by ">>" and "<<".
  547.  
  548. 0x025b M 0x0320 >>SD<< system_data
  549.     0x025c D 0x0024 >>KEYBUFX<< drv=KEYB-X   system_device
  550.     0x0281 D 0x0024 >>SETVER<< drv=SETVERXX system_device
  551.     0x02a6 D 0x0048 >>HIMEM<< drv=XMSXXXX0 system_device
  552.     0x02ef D 0x00c3 >>EMM386<< drv=EMMXXXX0 system_device
  553.     0x03b3 D 0x00f1 >>IFSHLP<< drv=IFS$HLP$ system_device
  554.     0x04a5 F 0x0082 >>*<<  system_files
  555.     0x0528 X 0x0005 >><<  system_fcbs
  556.     0x052e B 0x0020 >><<  system_buffers
  557.         0x052f M 0x3001 >><< 0x5b5a
  558.     0x054f L 0x002c >><<  system_lastdrive
  559.         0x0550 A 0x0000 >><< 0x5c3a
  560. 0x057c M 0x0004 >>SC<< system_code
  561. 0x0581 M 0x0003 >><< COMMAND
  562.     0x0582 C 0x4946 >>ommEMM<< 0x4e4f
  563. 0x0585 M 0x00bc >>COMMAND<< 
  564. 0x0647 M 0x0040 >>drort<< env=COMMAND
  565. 0x0688 M 0x001a >><< env=SWSUBST
  566. 0x06a3 M 0x190b >>SWSUBST<< 
  567. 0x9fff M 0x1159 >>SC<< system_code
  568. 0xb159 M 0x0077 >>SD<< system_data
  569.     0xb15a D 0x0076 >>EANSI<< drv=CON      system_device
  570. 0xb7fe M 0x2002 >>SC<< system_code
  571.     0xb7ff M 0x2000 >>SM<< system_memory
  572.     0xd800 Z 0x17ff >>UMB<< 
  573. 0xd801 M 0x07d5 >>SMARTDRV<< 
  574.  
  575.  
  576. If name is permitted, the MCB chains are searched for the name. Memory
  577. blocks marked with "env=" are skipped. The case is ignored. ERRORLEVEL
  578. is set to zero, when a MCB starting with name is found.
  579. Special meaning: The name must be exactly like the name enclosed in ">>"
  580. and "<<".
  581.  
  582.  
  583. Command 9) -
  584.  
  585. Breaks off all SUBST and JOIN relations currently exist.
  586.  
  587.  
  588. Commad 10) --
  589.  
  590. Runs Command 10) for all not networked drives.
  591. Note: This command sets the current working directory to the root
  592. directory.
  593.  
  594.  
  595. Command 11)    /j dr /d
  596.     oder    /j /d dr
  597.     oder    /j dr -
  598.     oder    /u /d dr 
  599.     oder    /u dr /d
  600.     oder    /u dr -
  601.     oder    /d dr
  602.     oder    dr /d
  603.     oder    dr -
  604.  
  605. Breaks off SUBST or JOIN relation of drive dr. No error occurs, when no
  606. relation exists. Then the DPB is initialized and the current working
  607. directory is set to the root directory.
  608.  
  609.  
  610. Command 12) dr [-]path
  611.  
  612. The action of this command derived from the name of the executable: If
  613. SWSUBST has been renamed to "JOIN", command 6) (JOIN) will be executed;
  614. else command 5) (SUBST).
  615.  
  616.  
  617. Command 13) /k [-]path
  618. "make directory"
  619.  
  620. This command creates the directory path and each required up-directory.
  621. If the dash '-' is given, the path is physical and bypass any SUBST and
  622. JOIN.
  623.  
  624.  
  625. Command 14) /q lw:{<op><flag>}
  626. "query"
  627.  
  628. This command is an opposit of command 2) and queries for the driver
  629. flags. ERRORLEVEL is set to zero, if the flags are set properly, to
  630. non-zero, if not.
  631.  
  632. Valid operations <op> are: '+' for "is set" and '-' for "is not set".
  633. Valid flags <flag> are: PHYSICAL, SUBST, NETWORK, JOIN, HIDDEN and an
  634. one or two digit decimal number in the range 0..15.
  635.  
  636.  
  637.  
  638.  
  639. Differences to MS-DOS's SUBST and JOIN:
  640.  
  641. The correct syntax of MS-DOS's SUBST and JOIN are:
  642.  
  643. 1) SUBST d: path
  644. 2) SUBST d: /d
  645. 3) SUBST 
  646.  
  647. Supported are all three forms, except in form:
  648. 1) path cannot start with a dash '-' and need not exist;
  649.    already SUBST'ed or JOIN'ed drives will be de-SUBST'ed or
  650.    de-JOIN'ed without warning before;
  651. 2) not SUBST'ed drives do not cause an error message;
  652.    JOIN'ed drives will be de-JOIN'ed;
  653. 3) displays not only the SUBST'ed drives, but the whole CDS table.
  654.  
  655. analogous JOIN.
  656.  
  657.  
  658.  
  659. Environment Variables:
  660. SWSUBST accesses the string "%SKAUS% %SKAUS17% %SKAUS17A% %SKAUS17A2%",
  661. before the command line arguments are parsed.
  662. Within the string any option (s. Options) may be placed. There are some
  663. optionsi (case-insensitive), only available using that environment
  664. variables. Whitespaces before or after '=' are not supported. Unless the
  665. diagnostic mode is turned on, errors are not reported.
  666.  
  667. Possible options are:
  668. 'banner'    displays the header line describing the program onto stderr.
  669. 'nobanner'    does not display the program header.
  670. 'silent'    suppresses all output (except banner and ERRORLEVEL).
  671.             This option suppresses legal output, too!
  672. 'nosilent'    does not suppress all output.
  673. 'errout=..'    redirects error messages:
  674.             .. == !  => merge into the standard output
  675.             .. == !# => merge into the output stream number #
  676.             .. <do not start with '!'> => into file ..
  677. 'errfile=.'    string's file, including error messages
  678.             . <empty> => use built-in German texts
  679.             . == # => the number # marks the start of the texts in the
  680.                       file of the executional
  681.             . <no number> => the file containing the texts
  682.                 [[s. Including of new Texts]]
  683. 'makeerrfile' dumps the German texts onto the standard output channel
  684.                 [[s. Including of new Texts]]
  685. 'dosish'    switches DOS compatibilty on. Only the formats described in
  686.             "Differences to DOS's SUBST and JOIN" are permitted. But
  687.             Format 3) produces DOS's SUBST or JOIN compatible tables.
  688.             JOIN and SUBST are differ like in command 12).
  689. 'nodosish'    switches DOS compatibility off.
  690. 'diag'        switches diagnostic mode off.
  691. 'nodiag'    switches diagnostic mode on.
  692.  
  693.  
  694.  
  695. Including of new Texts:
  696.  
  697. All of the linguistic output of the program are configurable, e.g. to
  698. speak another language. The standard is German.
  699.  
  700. Follow that steps to perform a change:
  701. 1) Set one of the four environment variables to "makeerrfile".
  702. 2) Run the program and redirect the output into a file, e.g.
  703.    "SWSUBST >swsubst.q".
  704. 3) Reset the environment variable to its old value or remove it.
  705. 4) Change the file "swsubst.q". But do NOT change the lines ">>#",
  706.    unless you do not want to change to whole text, so you must cut
  707.    the line out.
  708.    Each text cannot exceed the amount of the help screen (text behind
  709.    ">>0"), because this buffers the replacing internally. Therefore, you
  710.    have to redefine the help screen, or do not cut it out of the file.
  711.    Text of the form "%??" is replaced by arguments. You cannot change
  712.    the order of that strings, but you may omit them continuously from
  713.    the end of the text. (Note: That's the format string of a printf()
  714.    statement.)
  715. 5) To make the changed texts available to the program, change one
  716.    of the four environment variables (SKAUS is not really suitable)
  717.    by inserting the "errfile=" option.
  718.    Variant 1) Set the option to "errfile=...\swsubst.q", where ...  is
  719.    the absolute path to the file.
  720.    Variabt 2) Note down the length of the executable. The concate the
  721.    texts's file to the executable, e.g. with
  722.    "copy /b swsubst.exe + swsubst.q swsubst1.exe". [Note: If the last
  723.    characters is not ^Z (ASCII 1A hex or 26 dec) you should append one
  724.    to allow additional text files.] Then set the option to "errfile=#",
  725.    where # is the noted length. This number has to be written in C
  726.    syntax, that means, if it starts with "0x" or "0X", the number is
  727.    hexadecimal; if it starts with "0", the number is octal; else it's
  728.    decimal.
  729.  
  730. To get the German texts instead of the English ones, set the option
  731. "errfile=" without any argument. The built-in German texts are enabled
  732. then. To get the supplied English texts, set the option to "errfile=#",
  733. where # is the number described in the file "swsubst.lng".
  734.  
  735. You may share the SWSUBST executable with the concated text files, if
  736. you mark the changes in the "swsubst.lng" file.
  737.  
  738.  
  739.  
  740.  
  741. Author:
  742.  
  743. Steffen Kaiser
  744. Ernst-Thälmann-Straße 2
  745. D-39606 Iden
  746. Deutschland - Germany
  747.