home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 17 / CD_ASCQ_17_101194.iso / vrac / maint114.zip / README.TXT < prev    next >
Text File  |  1994-07-06  |  9KB  |  189 lines

  1. This is a small utility to modify any kind of INI-Files.
  2.  
  3. It is DOS-based, so you can easily do the modifications from your
  4. batchfile or your network login script.
  5.  
  6. As example, you can add the TimerCriticalSection=10000 for all users
  7. in the SYSTEM.INI file, just by doing the following:
  8.  
  9. Create a file named SYSTEM.CMD which contains:
  10. +[386enh]TimerCriticalSection=10000
  11.  
  12. And put the following command in you (system) login script:
  13. maintini.exe N:\WINDOWS\SYSTEM.INI SYSTEM.CMD
  14.  
  15. After the new login, all your users have the new parameter set correctly
  16. for the new WINUP9 from Novell.
  17.  
  18. A backupfile with the extension .BAK is made before modifying the file.
  19. Normaly all section, keys and values are NOT case sensitive.
  20. However _ and * give the possibility to match only if the case matches too.
  21.  
  22. MAINTINI can process INI-Files of any size, even larger than 64kBytes.
  23. Just the CMD File should not have to much commands, because a dynamic list
  24. with all commands is created. (The actual upper limit are 600 commands,
  25. if you need more, then send me a mail or just splitt it in two cmd-files.
  26. Anyway, to process a INI-file with 600 commands to apply is just slow.)
  27.  
  28. Commands of Maintini:
  29.  
  30. -[section]                The corresponding section is deleted
  31. -[section]Key             The Key in section will be deleted
  32. -[section]Key=Value       The Key is only deleted if the Value matches exactly
  33.                           This is used to delete device=... lines in system.ini
  34. _[section]Key=Value       Same as - but Value is case sensitive
  35.                           Normaly not used.
  36.  
  37. #[section]                The corresponding section is commented
  38. #[section]Key             The Key in section will be commented
  39. #[section]Key=Value       The Key is only commented if the Value matches exactly
  40.                           This is used to comment device=... lines in system.ini
  41. @[section]                The ; in front of the corresponding section is removed
  42. @[section]Key             The ; in front of the Key in section is removed
  43. @[section]Key=Value       The ; in front of the Key is removed, if the Value matches exactly
  44.                           This is used to uncomment device=... lines in system.ini
  45.  
  46. +[Section]Key=            Adds Key in Section.
  47. +[Section]Key=Value       Adds Key and Value to section.
  48. &[Section]Key=Value       This Key/Value is always inserted, even if already
  49.                           a key exists, but with a different value. Used to
  50.                           insert device=... lines in System.ini
  51. *[Section]Key=Value       Same as &, but the value is casesensitive
  52.                           Normaly not used.
  53.  
  54. ![Section]Key=Value       A key is inserted in section, but a numeric value is added to
  55.                           Key, representing the highest+1 value of Key.
  56.                           (Only ?) used for Progman.ini to add new program groups
  57.                           [Section]
  58.                           Key1=Value1
  59.                           Key2=Value2
  60.                           Key3=Value3
  61.  
  62.                           ![Section]Key=ValueZ
  63.  
  64.                           Gives
  65.                           [Section]
  66.                           Key1=Value1
  67.                           Key2=Value2
  68.                           Key3=Value3
  69.                           Key4=ValueZ
  70.  
  71.                           If the command in ![Section]Key=Value2 then
  72.                           the line is not duplicated.
  73.                           You can add multiple ! entrys per Section/Key pair in one pass
  74.  
  75. >[Section]Key= Value      Adds Value to an existing value. The old Value is preserved
  76.                           and the Value is added added at the end of the line.
  77.                           
  78.                           [Section]
  79.                           Key=Value0
  80.  
  81.                           >[Section]Key= Value1
  82.  
  83.                           Gives
  84.                           [Section]
  85.                           Key=Value0 Value1
  86.                           
  87.                           It is very important, that you have a space or a period sign
  88.                           before the Value, this is to ensure that the , sign is placed
  89.                           at the right place (or even ignored if this is the first value).
  90.  
  91. <[Section]Key=Value       Deletes Value from the Key/Value line. Leading and trailing 
  92.                           period-signs are cut off.
  93.  
  94. r[Section]Original=NewValue The string <Original> is replaced with <NewValue>, but only in
  95.                             if [Section] is the current one. If you want to replace the
  96.                             Original in ALL sections (even in the section definition) then
  97.                             specify [] as the section. 
  98.  
  99. R[Section]Original=NewValue Same as r command, but the case must match.
  100.  
  101. S[Section]Key=<EnvVarname>  The environment variable with name <EnvVarname> is set
  102.                             to the Value of this Section/Key.
  103.                             If [Section]Key does not exists, the environment is not
  104.                             modified.
  105.                             The modification is done in the master environment,
  106.                             which is the one of the FIRST command.com loaded.
  107.                             If you use this command under windows, the environment
  108.                             of the shell inside windows is NOT modified, but when
  109.                             you leave windows, the environment has the modified values !!!
  110.                             When I find a TP library which handles this correctly,
  111.                             I will implement it, that the parent environment is changed.
  112.  
  113.  
  114. Additionaly you have multiple IF commands to excecute commandlines based on external
  115. values.
  116.  
  117. IFMEMBER <GroupName> <Normal commandline>       Is excecuted if User is member of the give Netware
  118.                                                 Group. The User must be logged in the server.
  119. IFNMEMBER <GroupName> <Normal Commandline>      As IFMEMBER, but the commandline is only excecuted
  120.                                                 when the user is NOT member of the group
  121. IFENV <%EnvVar%> <Value> <Normal commandline>   When the environment variable %EnvVar% is equal to
  122.                                                 <Value>, the command is excecuted
  123. IFNENV <%EnvVar%> <Value> <Normal commandline>  Same as IFENV, but NOT EQUAL
  124.  
  125. IFMEMBER EVERYONE +[Windows]Group=Everyone      Adds Group=Everyone if the user is member of the group
  126. IFENV %USER% SSCA +[Windows]Supervisor=True     Sets Supervisor=True, when the environment variable
  127.                                                 USER is equal to SSCA
  128.  
  129.  
  130. You should not use more than one < or > command for each Section/Key !!!!
  131. This does not behave correctly. If this is a limitation for you, 
  132. then you can tell me why you want another version who can do this.
  133. I will then implement it, if I find the time to do it.
  134.  
  135. In ALL Value-strings, you can insert a sequence %...%, to replace the
  136. text with the content of an DOS environment variable.
  137.  
  138. +[boot]run=F:\USER\%USER%\WINDOWS\CAL.EXE
  139.  
  140. %USER%  will be replaced with the value of the USER - Environment variable.
  141.  
  142. When It finds a single % in the line then the % remains in the value.
  143.  
  144. If it finds %%, then it is replaced with a single %.
  145. So you can use F:\USR\%%USER%%\TEMP to be transformed into
  146. F:\USR\%USER%\TEMP. If you simply use F:\USR\%USER%\TEMP it will
  147. try to replace %USER% with the corresponing environment variable.
  148. You must use this, every time you have more than one % sign
  149. in the value, but don't want to replace it.
  150.  
  151. If the specified environment variable does not exist, then a warning message
  152. is displayed on the screen, and the %...% is removed from the value.
  153.  
  154.  
  155. When you want to rename a section, then do the following:
  156. r[][OldSectionName]=[NewSectionName]
  157. Maintini then looks in each line for the Old-name and if it finds it,
  158. it replaces it with the new name. You should include the [..] to be
  159. shure, that only section headings are replaced.
  160.  
  161. With the r command it is very easy to move a program/library to a new loaction.
  162. Of course you must take care to correct all other references to that location.
  163. (In the registeration database OLE, in DDE-statements and of course the
  164.  program icon in the program manager.)
  165.  
  166. MAINTINI is emailware, which means if you find this program usefull,
  167. you should send me a email. (Or a nice postcard if you don't have
  168. acess to a email system)
  169.  
  170. If you send me a message, then I will inform you of all changes and
  171. new versions of this utility.
  172.  
  173.  
  174. My email adress:
  175.  
  176. Compuserve   :  100034,3536 Andre Schild
  177. Internet     :  100034.3536@compuserve.com
  178. AT&T Mail    :  mhs!csmail!100034.3536
  179. X400         :  /c=US/ad=compuserve/pd=csmail/d.id=100034.3536
  180. MCI          :  TO: Andre Schild   
  181.                 EMS: COMPUSERVE/ MCI ID:281-6320
  182.                 MBX: 100034,3536
  183. MHS          :  MAIL@CSERVE {100034,3536}
  184.  
  185. Postal adress:  Andre Schild
  186.                 Pfeidstrasse 8
  187.                 CH-2555 Bruegg b. Biel
  188.                 Switzerland
  189.