home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 19 / CD_ASCQ_19_010295.iso / vrac / mtwin127.zip / README.TXT < prev    next >
Text File  |  1994-11-22  |  13KB  |  317 lines

  1. MAINTINI V1.27
  2. MAINTGRP V1.01
  3.  
  4. Maintini is a small Utility to modify any kind of INI Files.
  5.  
  6. Usage:
  7.  
  8. Maintini uses commandfiles (Extension CMD), which contains the modifications which should be made to the INI file.
  9.  
  10. MAINTINI [options] <INI-File> [options] <CMD-File> [options]
  11.  
  12. is the Syntax to call the program. If you want to modify multiple INI files, then you can create a ICM (Ini CoMmand File). This file contains on each line a INI file and a command file.
  13.  
  14. MAINTINI [options] /c [options] <CMD-File> [options]
  15.  
  16. ;
  17. ; Example ICM File
  18. ;
  19. C:\WINDOWS\WIN.INI     C:\UT\WIN.CMD
  20. C:\WINDOWS\SYSTEM.INI  C:\UT\SYSTEM.CMD
  21.  
  22. Possible options:
  23. /? -? /h /H -h -H    Displays online-help
  24. /v /V -v -V    Verbose mode, displays more runtime-infos
  25.  
  26.  
  27. A backup of the INI-File with the extension .BAK is made before modifying the file.
  28.  
  29. Normaly all section, keys and values are NOT case sensitive. However _ and * give the possibility to match only if the case matches too.
  30.  
  31. All lines which begins with ; are treated as comments.
  32.  
  33. MAINTINI can process INI-Files of any size, even larger than 64kBytes. Just the CMD File should not have to much commands, because a dynamic list with all commands is created. This is normaly not a problem, because you can use more than 100 commands in one CMD file. If this isn't enough, then you must splitt you CMD file and use a ICM file to do all changes.
  34.  
  35.  
  36. INI Commands
  37.  
  38. ;    When this is in front of a line, then this line is not used as a 
  39.     command. It is just ignored.
  40.  
  41. -[section]    The corresponding section is deleted
  42. -[section]Key                 The Key in section will be deleted
  43. -[section]Key=Value           The Key is only deleted if the Value matches exactly
  44.                               This is used to delete device=... lines in system.ini
  45.  
  46. _[section]Key=Value           Same as - but Value is case sensitive
  47.                               Normaly not used.
  48.  
  49. ~[section]Key=Value    Used to delete Keys, when the Key is terminated by a numeric
  50.     value. (Used to delete Groups in PROGMAN.INI)
  51.  
  52. #[section]                    The corresponding section is commented
  53. #[section]Key                 The Key in section will be commented
  54. #[section]Key=Value           The Key is only commented if the Value matches exactly
  55.                               This is used to comment device=... lines in system.ini
  56.  
  57. @[section]                    The ; in front of the corresponding section is removed
  58. @[section]Key                 The ; in front of the Key in section is removed
  59. @[section]Key=Value           The ; in front of the Key is removed, if the Value matches 
  60.     exactly. This is used to uncomment device=... lines in
  61.     system.ini
  62.  
  63. +[Section]Key=                Adds Key in Section.
  64. +[Section]Key=Value           Adds Key and Value to section.
  65.  
  66. The + commands knows the modifier ?  When the question-sign is put in front of the + command, then the specified command is only executed, when the key has no value, or does not currently exist. This allows you to initialize a key with a default value, but when it is modified by the user, his changes are not overwritten.
  67.  
  68. ?+[Section]Key=                Adds Key in Section, only if not already existing
  69. ?+[Section]Key=Value           Adds Key and Value to section, only if not already existing
  70.  
  71.  
  72. &[Section]Key=Value           This Key/Value is always inserted, even if already
  73.                               a key exists, but with a different value. Used to
  74.                               insert device=... lines in System.ini
  75.  
  76. *[Section]Key=Value           Same as &, but the value is casesensitive
  77.                               Normaly not used.
  78.  
  79. ![Section]Key=Value           A key is inserted in section, but a numeric value is added to
  80.                               Key, representing the highest+1 value of Key.
  81.                               (Only ?) used for Progman.ini to add new program groups.
  82.     ~ is used to delete such keys if needed.
  83.  
  84.                               If the value of the command is already found, then the line is 
  85.     not duplicated. You can add multiple ! entrys per Section/Key
  86.     pair in one pass
  87.  
  88. >[Section]Key=Value          Adds Value to an existing value. The old Value is preserved
  89.                               and the Value is added added at the end of the line.
  90.                           
  91.     When the values are separated with a period, (like network= in 
  92.     system.ini) then you must add a period sign before the value.
  93.     Like >[386enh]networks=,vipx.386. The period sign is then
  94.     inserted when used.
  95.  
  96. /[Section]Key=Value          Same as >, but the Value is inserted in front of all existing 
  97.     values.
  98.  
  99.     When the values are separated with a period, (like network= in 
  100.     system.ini) then you must add a period sign after the value.
  101.     Like >[386enh]networks=vipx.386,. The period sign is then
  102.     inserted when used.
  103.  
  104. <[Section]Key=Value           Deletes Value from the Key/Value line. Period signs should be 
  105.     handled correctly.
  106.  
  107. r[Section]Original=NewValue    The string <Original> is replaced with <NewValue>, but only in
  108.                                 if [Section] is the current one. If you want to replace the
  109.                                 Original in ALL sections (even in the section definition) then
  110.                                 specify [] as the section. 
  111.  
  112. R[Section]Original=NewValue    Same as r command, but the case must match.
  113.  
  114. S[Section]Key=<EnvVarname>    The environment variable with name <EnvVarname> is set
  115.                                 to the Value of this Section/Key.
  116.                                 If [Section]Key does not exists, the environment is not
  117.                                 modified.
  118.                                 The modification is done in the master environment,
  119.                                 which is the one of the FIRST command.com loaded.
  120.                                 If you use this command under windows, the environment
  121.                                 of the shell inside windows is NOT modified, but when
  122.                                 you leave windows, the environment has the modified values !
  123.  
  124.  
  125. Conditional excecution
  126.  
  127. You have multiple IF commands available to excecute commandlines based on external values.
  128.  
  129. IFMEMBER <GroupName> <Normal commandline>
  130.     Is excecuted if User is member of the give Netware
  131.     Group. The User must be logged in the server.
  132.  
  133. IFNMEMBER <GroupName> <Normal Commandline>
  134.     As IFMEMBER, but the commandline is only excecuted
  135.     when the user is NOT member of the group
  136.  
  137. IFENV <%EnvVar%> <Value> <Normal commandline>
  138.     When the environment variable %EnvVar% is equal to
  139.     <Value>, the command is excecuted
  140.  
  141. IFNENV <%EnvVar%> <Value> <Normal commandline>
  142.     Same as IFENV, but NOT EQUAL
  143.  
  144. IFEXISTENV <EnvVar> <Normal commandline>
  145.     When the environment variable EnvVar exists, the command
  146.     is excecuted. Please note, that the name of the environment 
  147.     variable is specified without any % signs.
  148.  
  149. IFNEXISTENV <EnvVar> <Normal commandline>
  150.     Same as IFEXISTENV, but NOT EXISTS
  151.  
  152.  
  153. Environment Values
  154.  
  155. In ALL strings, you can insert a sequence %...%, to replace the text with the content of an DOS environment variable.
  156.  
  157. +[boot]run=F:\USER\%USER%\WINDOWS\CAL.EXE
  158.  
  159. %USER%  will be replaced with the value of the USER - Environment variable.
  160.  
  161. When It finds a single % in the line then the % remains unmodified.
  162. All %% are replaced with a single %. So you can use F:\USR\%%USER%%\TEMP to be transformed into F:\USR\%USER%\TEMP. If you simply use F:\USR\%USER%\TEMP it will
  163. try to replace %USER% with the corresponing environment variable.
  164.  
  165. You must use this, every time you have more than one % sign in the value, but don't want to replace it.
  166.  
  167. If the specified environment variable does not exist, then a warning message is displayed on the screen, and the %...% is removed from the value.
  168.  
  169. Since V1.24 you can reference lowercase environment variables too. Such like windir=C:\windows. In previous versions, the environment variables have been expected all uppercase.....
  170.  
  171. EXAMPLES
  172.  
  173. ![Section]Key=ValueZ
  174.  
  175. [Section]    [Section]
  176. Key1=Value1    Key1=Value1
  177. Key2=Value2    Key2=Value2
  178. Key3=Value3    Key3=Value3
  179.     Key4=ValueZ
  180.  
  181. >[Section]Key=Value1
  182.  
  183. [Section]    [Section]
  184. Key=Value0    Key=Value0 Value1
  185.  
  186. >[Section]Key=,Value1
  187.  
  188. [Section]    [Section]
  189. Key=Value0    Key=Value0,Value1
  190.  
  191. /[Section]Key=Value1,
  192.  
  193. [Section]    [Section]
  194. Key=Value0    Key=Value1,Value0
  195.  
  196. <[Section]Key=Value1
  197.  
  198. [Section]    [Section]
  199. Key=Value0,Value1    Key=Value0
  200.  
  201. IFMEMBER MANAGER ![Groups]Group=LAFW.GRP
  202.  
  203. Adds GroupXX=LAFW.GRP only if the user is member of the group MANAGER
  204.  
  205. IFENV %USER% SSCA +[Windows]Supervisor=True
  206.  
  207. Sets Supervisor=True, when the environment variable USER is equal to SSCA
  208.  
  209. +[boot]run=F:\USER\%USER%\WINDOWS\CAL.EXE
  210.  
  211. %USER%  will be replaced with the value of the USER - Environment variable.
  212.  
  213. +[boot]run=F:\USER\%%USER%%\WINDOWS\CAL.EXE
  214.  
  215. gives run=F:\USER\%USER%\WINDOWS\CAL.EXE
  216.  
  217. r[][OldSectionName]=[NewSectionName]
  218.  
  219. This command renames a section heading. Maintini then looks in each line for the Old-name and if it finds it, it replaces it with the new name. You should include the [..] to be shure, that only section headings are replaced.
  220.  
  221. Take care when... 
  222.  
  223. - Modifying device= lines in the SYSTEM.INI file. Since this is the only place where multiple keys exists, who have the same name. To handle this special situation, you MUST use the & command instead of the + command. When you try to do modifications with the + command, then either all device= lines have the same value, or/and some keys are added multiple times.
  224.  
  225. - With the r command it is very easy to move a program/library to a new loaction. Of course you must take care to correct all other references to that location. (In the registeration database OLE, in DDE-statements and of course the program icon(s) in the program manager.)
  226.  
  227. Known Problems
  228.  
  229. - When using the S command to set environment variables, then be aware of the following considerations.
  230. The modification is done in the master environment, which is the one of the FIRST command.com loaded. If you use this command under windows, the environment
  231. of the shell inside windows is NOT modified, but when you leave windows, the environment has the modified values !!! When I find a TP library which handles this correctly, I will implement it, that the parent environment is changed. (Perhaps you have an idea where to find such a library ???)
  232.  
  233. - No other Problems are known for this release V1.27
  234.  
  235. Maintini is a small Utility to modify any kind of INI Files.
  236.  
  237. Usage:
  238.  
  239. Maintgrp compiles and decompiles GRP-Files into GRI-Files. These GRI Files are similar to a normal INI-File and can be modified via MAINTINI. In some of the next releases, these two programms will be merged together, so that you need only one call to modify your GRP-files.
  240.  
  241. MAINTGRP [/c|/d] [/s] <INI-File> <GRI-File> 
  242.  
  243. /c tells MAINTGRP to compile a GRI-File into a GRP file.
  244. /d tells MAINTGRP to decompile a GRP file into a GRI file.
  245. /s tells MAINTGRP to use the command-line as Icon-heading, instead of the Iconname
  246.  
  247.  
  248. When you decompile a GRP-File, you receive a GRI-File like this:
  249.  
  250. ;
  251. ; Created by MaintGRP V0.05
  252. ;
  253. ; Decompiled at Tue Oct 25 19:57:50 1994
  254. ;
  255. ;
  256. ; Source File <C:\windows\autostar.grp>
  257. ;
  258. [Group Info]
  259. Display=SW_SHOWMINIMIZED
  260. UpperLeftX=0
  261. UpperLeftY=0
  262. LowerRightX=160
  263. LowerRightY=93
  264. PosX=546
  265. PosY=215
  266. PRGName=Autostart
  267.  
  268. [Click]
  269. IconFile=C:\WINDOWS\CLICK\CLICK.EXE
  270. Command=C:\WINDOWS\CLICK\CLICK.EXE
  271. IconPosX=21
  272. IconPosY=0
  273. IconNr=0
  274. Path=C:\WINDOWS\CLICK\
  275.  
  276. [Notifaxd]
  277. Path=H:\CCMAIL\
  278. Minimized=1
  279. IconNr=6
  280. IconPosY=0
  281. IconPosX=96
  282. Command=H:\CCMAIL\NOTIFAXD.EXE
  283. IconFile=H:\CCMAIL\NOTIFAXD.EXE
  284.  
  285. In the section [Group Info] the global setup of this group is defined. All Icons follow in a section for each icon. The Top-Most Group is the selected icon when the group is opened. The simplest way to see what valid parameters exists, is to  decompile different GRP-files. A more specific description will be included in a next release.
  286.  
  287. In the BATCH-File EXAMPLE.BAT, the autostart-group is decompiled, then, if the network is active then the cc:Mail-Notify is automaticaly loaded, or if the net is not active, then no cc:Mail-Notifax is loaded.
  288.  
  289.  
  290. Known Problems
  291.  
  292. - No problems are actualy known for the 1.01 release
  293.  
  294.  
  295. Licence Agreement
  296.  
  297. MAINTINI and MAINTGRP are emailware, which means if you find this program usefull, you should send me a email. (Or a nice postcard if you don't have acess to a email system)
  298.  
  299. If you send me a message, then I will inform you of future versions of this utility. If you have some questions, then please tell me which version of maintini/maintgrp you use.
  300.  
  301.  
  302. My email adress:
  303.  
  304. Compuserve   :  100034,3536 Andre Schild
  305. Internet     :  100034.3536@compuserve.com
  306. AT&T Mail    :  mhs!csmail!100034.3536
  307. X400         :  /c=US/ad=compuserve/pd=csmail/d.id=100034.3536
  308. MCI          :  TO: Andre Schild   
  309.                 EMS: COMPUSERVE/ MCI ID:281-6320
  310.                 MBX: 100034,3536
  311. MHS          :  MAIL@CSERVE {100034,3536}
  312.  
  313. Postal adress:  Andre Schild
  314.                 Pfeidstrasse 8
  315.                 CH-2555 Bruegg b. Biel
  316.                 Switzerland
  317.