home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / 9603ls01.zip / WPTOOL18.ZIP / checkini.txt < prev    next >
Text File  |  1995-10-31  |  24KB  |  600 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.            CHECKINI.TXT                                                Page 1
  8.  
  9.                                     TABLE OF CONTENTS
  10.  
  11.              1. DISCLAIMER .................................................2
  12.              2. INTRODUCTION ...............................................2
  13.              3. IMPORTANT NOTICES ..........................................3
  14.              3.1. NEW VERSIONS OF OS/2 .....................................3
  15.              3.2. NETWORK ENVIRONMENTS .....................................3
  16.              4. USING CHECKINI .............................................4
  17.              4.1. COMMAND LINE OPTIONS .....................................4
  18.              4.2. OUTPUT ON SCREEN .........................................4
  19.              4.3. WHEN CHECKINI IS FINISHED ................................5
  20.              5. DETAILED DESCRIPTION .......................................5
  21.              5.1. PM_Workplace:Handles .....................................5
  22.              5.2. ORPHAN OBJECTS ...........................................6
  23.              5.3. WHAT THE PROGRAM CHECKS FOR ..............................7
  24.              5.4. EXAMPLES of OUTPUT: ......................................9
  25.              5.5. REVISION HISTORY ........................................10
  26.  
  27.  
  28.  
  29.  
  30.  
  31.            CHECKINI.TXT                                                Page 2
  32.  
  33.            1. DISCLAIMER
  34.  
  35.            17 October 1995
  36.  
  37.            I allow you to use and distribute CHECKINI freely under the
  38.            condition that I am in no way responsible for any damage or loss
  39.            you may suffer.
  40.  
  41.            Henk Kelder,
  42.            Harderwijk
  43.            The Netherlands
  44.  
  45.            2:280/801.339@fidonet.org
  46.  
  47.  
  48.            2. INTRODUCTION
  49.  
  50.            CHECKINI checks for, and optionally corrects, some problems in
  51.            OS2.INI and OS2SYS.INI. CHECKINI only looks at information
  52.            regarding the workplace shell and ONLY at information regarding
  53.            the workplace shell.
  54.  
  55.            The make full use of CHECKINI read this document to acquire
  56.            information about what CHECKINI does.
  57.  
  58.            The main reason for CHECKINI was the growth that the both .INI
  59.            files used to to show if one used the Workplace shell heavily.
  60.  
  61.            Since OS/2 2.1 the total INI-file handling has been changed and
  62.            the ini-files no longer show the big growth. Inconsistencies in
  63.            the ini-files can however still occur. Also, most, if not all,
  64.            redundant information, as described in this document can still be
  65.            present.
  66.  
  67.            Also CHECKINI helps to determine some possible cause's for
  68.            workplace shell failures like loosing workplace shell objects, or
  69.            situations in which a program object looses the proper executable
  70.            name or current directory. Obviously, the real cause for these
  71.            problems must be in the workplace shell itself, CHECKINI however
  72.            could help you to determine the degree of damage that has been
  73.            done.
  74.  
  75.            Note: CHECKINI does not work when Presentation manager has not
  76.            been started.
  77.  
  78.  
  79.  
  80.  
  81.  
  82.            CHECKINI.TXT                                                Page 3
  83.  
  84.            3. IMPORTANT NOTICES
  85.  
  86.            3.1. NEW VERSIONS OF OS/2
  87.  
  88.            You should take care when using this program on new versions of
  89.            OS/2 since this program interprets data from the ini-files.
  90.            The internal structure of this data can change, and the program
  91.            might fail or even corrupt information.
  92.  
  93.            The best way to test this is run checkini WITHOUT the /C option!
  94.            (Optionally use the /W option to write out all checkini's
  95.            findings and inspect the logfile)
  96.            If Checkini reports un unusual amount of errors, the internal
  97.            structure of the workplace shells data inside the ini-files might
  98.            have changed.
  99.            Look in CHECKINI's logfile at the  "PM_Abstract:Objects &
  100.            PM_Abstract:FldrContents" section with special care.
  101.            If this section contains a lot of errors while your workplace
  102.            shell seems to function properly there might have been a change,
  103.            so:
  104.  
  105.            DO NOT USE CHECKINI.EXE or WPSBKP.EXE then!
  106.            ===========================================
  107.  
  108.            (see DANGER.TXT about this)
  109.  
  110.  
  111.            3.2. NETWORK ENVIRONMENTS
  112.  
  113.            if you are normally connected to a network and run CHECKINI when
  114.            you are NOT connected to this network, or when you are not logged
  115.            in, CHECKINI will report errors for references to network
  116.            objects. The same applies for not present CD-ROM Drives.
  117.  
  118.            You can use the /R switch to suppress errormessages on non-
  119.            locateable drives.
  120.  
  121.  
  122.  
  123.  
  124.  
  125.            CHECKINI.TXT                                                Page 4
  126.  
  127.            4. USING CHECKINI
  128.  
  129.            From an OS/2 command prompt enter the command CHECKINI.
  130.            Without any command line options CHECKINI doesn't change anything
  131.            to your ini-files.
  132.  
  133.            4.1. COMMAND LINE OPTIONS
  134.  
  135.            /C             -    Write corrections to ini-files. The
  136.                                default is to diagnose only. If this
  137.                                option is specified the program will ask
  138.                                confirmations for all changes it may want
  139.                                to do in your ini-files.
  140.  
  141.            /APath         -    Specify different location for ini-files
  142.                                to be checked. This option is useful if
  143.                                you have a copy of you ini files and you
  144.                                would like these copies to be checked.
  145.                                NOTE: Do NOT use this option to check ini-
  146.                                files not belonging to the PC you run
  147.                                CHECKINI on.
  148.  
  149.            /Llogfilename  -    Specify name of logfile. The default is
  150.                                CHECKINI.LOG in the directory you start
  151.                                the program in.
  152.  
  153.            /W             -    Write all output to logfile. Normally only
  154.                                problems are written to the logfile. This
  155.                                option could help you to inspect a lot
  156.                                about your workplace shell objects
  157.                               
  158.            /S             -    'Silent run', only write logfile. Normally
  159.                                found errors are reported directly.
  160.  
  161.            /R             -    Generate no errors on non-locateable drives 
  162.                                such as not connected CDROMS or Network     
  163.                                drives.
  164.  
  165.            /?             -    Show info.
  166.  
  167.  
  168.            4.2. OUTPUT ON SCREEN
  169.  
  170.            While running CHECKINI displays all found information on the
  171.            screen. Whenever a problem is found, and the /S switch is not
  172.            used the program reports the problem. The problem itself is
  173.            visible in the bottom lines of the screen. Problems are always
  174.            reported in CAPITALS.
  175.  
  176.  
  177.  
  178.  
  179.  
  180.            CHECKINI.TXT                                                Page 5
  181.  
  182.  
  183.            4.3. WHEN CHECKINI IS FINISHED
  184.  
  185.            When you have used CHECKINI with the /C argument be prepared to
  186.            shutdown immediately after CHECKINI has completed. This because
  187.            the workplace shell has a copy of the ini-files in memory and
  188.            writes them back to disk on a timed basis. It can happen that
  189.            this mechanism will undo some of the changes CHECKINI made.
  190.            Sorry, you'll have to do it again if this happens.
  191.  
  192.            A better approach is to reset the Workplace shell using RESETWPS,
  193.            but even than it is possible that one must run CHECKINI multiple
  194.            times before all corrections are kept.
  195.  
  196.  
  197.            5. DETAILED DESCRIPTION
  198.  
  199.            5.1. PM_Workplace:Handles
  200.  
  201.            A special note is in place about a specific piece of information
  202.            in the INI-files called 'PM_Workplace:Handles'.
  203.            The workplace shell uses some obscure entity called
  204.            object-handles to refer to objects. Object handles are in fact
  205.            numbers. A object-handle can refer to a abstract object (a object
  206.            NOT on your hard disk e.g. the colour palette) and file-system
  207.            objects (files & directories).
  208.  
  209.            Abstract objects reside in the ini-files.
  210.            File-system objects reside on your hard disk.
  211.  
  212.            Whenever you add a program object to your desktop and specify a
  213.            program file the workplace shell determines if a handle was
  214.            already assigned to the program file and if so, it uses this
  215.            handle. If no handle was assigned, the shell creates a handle and
  216.            assigns it to the program file. In the definition of the program
  217.            object (self an abstract object) the handle for the program file
  218.            is stored.
  219.  
  220.            When you start the program by clicking on the object the wps
  221.            must have a way to refer the stored handle back to the program
  222.            file. This is done by using the 'PM_Workplace:Handles'
  223.            information. Unfortunately only handles are added to this
  224.            information and they are not removed when a (program)file is
  225.            removed from your hard disk.
  226.  
  227.            CHECKINI allows you to remove handles for files or directories
  228.            that no longer are present or are inaccessible.
  229.  
  230.  
  231.  
  232.  
  233.  
  234.            CHECKINI.TXT                                                Page 6
  235.  
  236.            5.2. ORPHAN OBJECTS
  237.  
  238.            (OS/2 2.x ONLY)
  239.  
  240.            An wide spread way to remove undeletable objects is to move
  241.            them to a directory, and then, in a OS/2 or DOS session remove
  242.            the directory. The Workplace shell than no longer shows the
  243.            objects. They are in fact NOT removed but they simply have no
  244.            parent directory they will show in (no stool to sit on).
  245.            Also, sometimes it is possible that suddenly several objects
  246.            are lost. A reason for this could be a unintentional removal
  247.            of a desktop directory.
  248.  
  249.            CHECKINI detect these 'orphan objects' and queries to user (when
  250.            /C specified) to recreate the folder (directory) these objects
  251.            where located in or as an alternative, move these objects to
  252.            another (new) location. Any moved objects will appear after the
  253.            workplace shell has been restarted. (after a reboot or resetwps!)
  254.  
  255.            If none of the above options was selected the user is presented
  256.            to possibility to purge the objects from the ini-files.
  257.  
  258.            NOTE: This has changed under WARP. Deleting a directory from a
  259.            OS/2 or DOS session now also deletes all objects that reside in
  260.            that directory.
  261.  
  262.  
  263.  
  264.  
  265.  
  266.            CHECKINI.TXT                                                Page 7
  267.  
  268.            5.3. WHAT THE PROGRAM CHECKS FOR
  269.  
  270.            The classlist (the list of all registered classes) is checked to
  271.            see of all modules (=dynamic link libraries) are present and can
  272.            be loaded.
  273.  
  274.            The following ini-records (Application - Key) are checked:
  275.  
  276.            PM_Abstract:Objects     - (all keys)
  277.            (Mainly checks WPProgram objects for consistency, but also
  278.            checks for 'lost-objects' - objects moved to non-existing
  279.            locations. Also checks WPNetLink and WPShadow links. If the
  280.            `classlist' check is not skipped the objectclass of each object
  281.            is checked)
  282.  
  283.  
  284.            PM_Abstract:FldrContent - (all keys)
  285.            (Used for the check mentioned above for 'lost-objects')   
  286.  
  287.  
  288.            PM_Workplace:Handles[0/1] - BLOCKn
  289.            (Checks consistency and existence of filesystem object-handles)
  290.  
  291.            PM_Workplace:Location   - (all keys)
  292.            (Checks existence of object where id-strings like <WP_DESKTOP>
  293.            point to)
  294.  
  295.            PM_Workplace:Folderpos  - (all keys)
  296.            (Checks for obsolete saved object positions, fonts, etc)
  297.  
  298.            PM_PrintObject:JobCnrPos - (all keys)
  299.            (Checks for obsolete saved print job container positions)
  300.  
  301.            PM_Workplace:PalettePos - (all keys)
  302.            (Checks for obsolete saved palette positions, fonts, etc)
  303.  
  304.            PM_Workplace:StatusPos - (all keys)
  305.            (Checks for obsolete save power status objects)
  306.  
  307.            PM_Workplace:PrintObjects - (all keys)
  308.            (Checks if all printobjects exist)
  309.  
  310.            PM_Workplace:Templates  - (all keys)
  311.            (Checks for template-records that refer to non-existing objects)
  312.  
  313.            PM_Abstract:Icons       - (all keys)
  314.            (Checks for obsolete icons, icons for abstract objects that do
  315.            not exist)
  316.  
  317.            PMWP_ASSOC_FILTER       - (all keys)
  318.            (Checks for associations with non-existing objects)
  319.  
  320.            PMWP_ASSOC_TYPE         - (all keys)
  321.            (Checks for associations with non-existing objects)
  322.  
  323.  
  324.  
  325.  
  326.  
  327.            CHECKINI.TXT                                                Page 8
  328.  
  329.            PMWP_ASSOC_CHECKSUM     - (all keys)
  330.            (Checks for obsolete checksum record that point to
  331.            non-existing objects)
  332.  
  333.            PM_Workplace:Startup    - (all keys)
  334.            (Checks if the referenced folders are in fact startup folders)
  335.  
  336.            FolderWorkareaRunningObjects - (all keys)
  337.            (Checks for a list of open objects for a workarea)
  338.  
  339.  
  340.  
  341.  
  342.  
  343.            CHECKINI.TXT                                                Page 9
  344.  
  345.            5.4. EXAMPLES of OUTPUT:
  346.  
  347.            =================================================
  348.             PM_Workplace:Handles:BLOCK1                  
  349.            =================================================
  350.            3E2DA:CHECKINI.EXE   =>E:\ICON\CHECKINI.EXE<-UNABLE TO ACCESS
  351.            395F8:COPYINI.EXE    =>E:\ICON\COPYINI.EXE<-UNABLE TO ACCESS
  352.            39400:GETPROG.EXE    =>E:\ICON\GETPROG.EXE<-UNABLE TO ACCESS
  353.            =================================================
  354.             PM_Abstract:Objects & PM_Abstract:FldrContents
  355.            =================================================
  356.              Object 13087, Class WPNetLink : A network folder
  357.               Linked to: \\SERVER09\SYS3\DIRECTORY1<-UNABLE TO ACCESS!
  358.              Object 140AD, Class WPNetLink : SYS3
  359.               Linked to: \\SERVER09\SYS3<-UNABLE TO ACCESS!
  360.              Object 15185, Class WPNetLink : SYS1
  361.               Linked to: \\SERVER09\SYS1<-UNABLE TO ACCESS!
  362.              Object 15956, Class WPNetLink : A network folder
  363.               Linked to: \\SERVER09\SYS3\DIRECTORY1<-UNABLE TO ACCESS!
  364.            =================================================
  365.             Checking AssocCheckSum                         
  366.            =================================================
  367.            PMWP_ASSOC_CHECKSUM:252153
  368.              points to 3D8F9 - E:\ICON\GETBLOCK.EXE<-UNABLE TO ACCESS
  369.            =================================================
  370.             Checking FolderPos                             
  371.            =================================================
  372.            PM_Workplace:FolderPos:252223@10
  373.              points to 3D93F - OBJECT DOES NOT EXIST
  374.  
  375.  
  376.  
  377.  
  378.  
  379.            CHECKINI.TXT                                               Page 10
  380.  
  381.            5.5. REVISION HISTORY
  382.  
  383.            Notes on version 1.1:
  384.  
  385.            o   Some checks were added:
  386.                PM_Workplace:PalettePos
  387.                PM_Workplace:Startup
  388.                Some other checkings were extended.
  389.  
  390.            Notes on version 1.2:
  391.  
  392.            o   The check for PM_Workplace:Handles was moved so that it would
  393.                be the last test done.
  394.  
  395.            o   The fraise 'DOES NOT EXIST' for file objects (files & 
  396.                directories) has been changed to 'UNABLE TO ACCESS' since    
  397.                 this is a better description of what CHECKINI finds.
  398.  
  399.            Notes on version 1.3:
  400.  
  401.            o   The only extra in this version is that it support OS/2    
  402.                2.00.1 (beta version) since in this version the internal    
  403.                structure of various workplace shells object data has    
  404.                changed.
  405.  
  406.            Notes on version 1.4:
  407.  
  408.            o    Not all the data checkini apparently needs to exist. If
  409.                 some data  checkini checks does not exist, the test is
  410.                 skipped.
  411.  
  412.            Notes on version 1.5:
  413.  
  414.            o    Checkini now works properly after installing the
  415.                 servicepack dated october 1992.
  416.  
  417.            Notes on version 1.6:
  418.  
  419.            o    Two additional tests were added. These test are for:
  420.                 - 'FolderWorkareaRunningObjects' and
  421.                 - 'PM_PrintObject:JobCnrPos'
  422.  
  423.            o   When a conflict in OBJECTID's is detected (two or more objects
  424.                having the same OBJECTID, CHECKINI /c can assign a new
  425.                OBJECTID to the objects that claim to have an OBJECTID that is
  426.                already in use by another object.
  427.  
  428.            o    Updated the documentation files (this file)
  429.  
  430.            o   A simple test has been build in to see if OBJECTID's can be
  431.                found in the ini-files, to determine if the internal data
  432.                structure of the ini-files might have been changed and
  433.                CHECKINI will fail completely. This is however no guarantee
  434.                that CHECKINI will function properly on new versions of OS/2
  435.                2.0.
  436.  
  437.  
  438.  
  439.  
  440.  
  441.            CHECKINI.TXT                                               Page 11
  442.  
  443.  
  444.            Notes on version 1.7:
  445.  
  446.            o   The 'simple test' mentioned above might block someone using
  447.                CheckIni if the ini-file itself is corrupt. Now the test is
  448.                only performed when /C (correct) switch is specified.
  449.  
  450.            Notes on version 1.8:
  451.  
  452.            o   When checking 'PM_Workplace:Handles' a test has been put in
  453.                that checks the accessibility on a volume in one strike.
  454.                If the user okays the removal of all references to a
  455.                non-locateable volume, all handles on that volume are removed
  456.                without further checking.
  457.  
  458.            Notes on version 1.81:
  459.  
  460.            o   Apparently CheckIni went bananas whenever an alternate ini
  461.                directory was specified and no ini's were found. This has been
  462.                corrected.
  463.  
  464.            o   Some minor enhancements were made to the text that is being
  465.                shown on the screen. These changes mainly have to do with
  466.                signalling problems with OBJECTID's.
  467.  
  468.            o   CheckIni refused to Change/Correct anything if the Desktop's 
  469.                Extended attributes have been damaged. CheckIni now offers a
  470.                try-to-repair option.
  471.  
  472.                This option comes down to CheckIni re-assigning objectid
  473.                <WP_DESKTOP> to the desktop when CheckIni is unable to locate
  474.                this ObjectId inside the Desktop Extended Attributes. If this
  475.                corrective action has been taken CheckIni terminates and one
  476.                should wait a view moments so the WPS has time to update the
  477.                physical extended attribute on disk.
  478.  
  479.            Notes on version 1.90:
  480.  
  481.            o   This version now supports all known versions of OS/2 2.0 and 
  482.                OS/2 2.1 Beta versions up till release level 6.498 (March '93)
  483.  
  484.            Notes on version 1.91:
  485.  
  486.            o   The try-to-repair option will be called also now when the
  487.                desktop folder doesn't contain the .CLASSINFO extended
  488.                attribute at all.
  489.  
  490.            o   When /C was specified, and lost objects were found and the
  491.                user choose for 'discard object', the OBJECTID was still
  492.                checked and when an error was found the program asked if a new
  493.                OBJECTID should be assigned. This has been corrected
  494.  
  495.            Notes on version 1.92:
  496.  
  497.            o     Several small (non-functional) errors were corrected.
  498.  
  499.  
  500.  
  501.  
  502.  
  503.  
  504.            CHECKINI.TXT                                               Page 12
  505.  
  506.  
  507.            o     Verified that CHECKINI works with OS/2 2.1 GA (rev. 6.514)
  508.  
  509.            Notes on version 1.93:
  510.  
  511.            o   Corrected a problem were CheckIni reported a problem with    
  512.                 'Not enough memory' in GetAllProfileNames.
  513.  
  514.            o   When a directory containing objects is missing, CHECKINI now
  515.                first tries to recreate this directory before trying to move
  516.                the objects. (Only on local drives)
  517.  
  518.            Notes on version 1.94:
  519.  
  520.            o   Due to a bug in the Workplace shell, whenever Checkini
  521.                (re)assigned an OBJECTID to a Scheme Palette, all scheme's
  522.                went to 'New Scheme'.
  523.  
  524.                The same problem  could occur on OS/2 2.1 installations that
  525.                were installed on top of OS/2 2.0. The problem would even then
  526.                occur when the /C option was not specified.
  527.                These problems have been corrected.
  528.                   
  529.            Notes on version 1.95:
  530.  
  531.            o   When the workplace shell had more then 64 Kb of
  532.                object-handle-to-file data (PM_Workplace:HandlesX) CHECKINI
  533.                would mess up. Now CHECKINI can handle multiple BLOCK records
  534.                and will only write as much of these records as needed back to
  535.                OS2SYS.INI (and discard any others)
  536.  
  537.            o   Objects of class WPTransient were not recognized and therefore
  538.                whenever and OBJECTID of such an object existed CHECKINI would
  539.                give an error message. This has been corrected.
  540.  
  541.            Notes on version 1.96:
  542.  
  543.            o   Checkini with abort when very long file names had to be
  544.                presented on the screen. This has been corrected.
  545.  
  546.  
  547.            Notes on version 1.97:
  548.  
  549.            o   This version works with OS/2 3.0 (Warp version)
  550.  
  551.            o   Some minor bugs where corrected.
  552.  
  553.            Notes on version 1.98:
  554.  
  555.            o   In version 1.95 I added logic to handle more then 64 Kb of
  556.                object-handle-to-file data. I implicitally assumed then that I
  557.                would always read the multiple BLOCK records in the proper
  558.                order. As it turns out this assumption is not always correct.
  559.                I've changed it so I will always read the proper order.
  560.  
  561.  
  562.  
  563.  
  564.  
  565.            CHECKINI.TXT                                               Page 13
  566.  
  567.            Notes on version 1.99:
  568.  
  569.            o   I've found that some OBJECTID's can be *extreme* long. I've
  570.                increased the internal buffer from 50 to 150 chars.
  571.  
  572.             Notes on version 1.991
  573.  
  574.            o   Corrected some problems with corrupted objectdata where
  575.                checkini would trap on.
  576.  
  577.            o   Implemented the /R switch that makes Checkini to ignore errors
  578.                on non-locateable drives.
  579.  
  580.            o   Added tests for object classes, PM_Workplace:StatusPos, and
  581.                PM_PrintObjects. Also checkini now tests all abstract objects
  582.                for existing classes and checks if startup folders are present
  583.                in PM_Workplace:Startup.
  584.  
  585.            o   CHECKINI now offers to remove objects that contain errors (/C
  586.                option).
  587.  
  588.            Notes on version 1.992
  589.  
  590.            o   Corrected a rather STUPID error that made CHECKINI abort.
  591.  
  592.            Notes on version 1.993
  593.  
  594.            o   By mistake forgot to update the version number of version 
  595.                1.992
  596.  
  597.            o   Corrected a problem with template checking where templates
  598.                of a Transient derived class were not recoqnized.
  599.  
  600.