ÛßßßÛ ÛßßßÛ Û Û ß Û ß Û Û Û ÛÜÜÜÜÛ Û Ûßßßß ßÛß ÛßßßÛ Ûßßß Û ßßßßÛ ÛßßßÜ Ûßßßß Û Û Û Û ßßßßÛ Û Û Û Û Û ÛßßßÛ Û Û Û ÛÜÜÜÛ Û Û Û ÛÜÜÜÛ Û ÛÜÜÜÛ Û Û ÛÜÜÜÛ Û Û Copyright 1995 (c) by Richard Guenette richgn@netcom.com PC Historian (PCH) is copyrighted freeware for MS-DOS PCs. You may use and distribute the program free of charge, but you may not charge money for it. You may not alter PCH without permission. PC Historian is provided as is, without guarantees of any kind. You use PCH at your own risk. I am not liable for any consequence arising from its use. ############### INTRODUCTION ############### Have you ever had to change your PC's configuration when installing a new DOS or Windows program? Ever needed to recover from such changes when some unhappy side effect appeared? I certainly have! That's why I wrote PC Historian (HISTORY.EXE). PCH is designed to automatically generate a history of your PC's configurations and to give you control over that history. PCH features include: * Maintenance of a "reference set" of current configuration files in a safe location. These include AUTOEXEC.BAT, CONFIG.SYS, and if Windows is installed, WIN.INI, and SYSTEM.INI. * Storage of old configuration file sets in LZH or ZIP archives. To make them easy to identify, config archives are named by the date of their creation. * An update procedure to automatically scan the current configuration for changes on boot up. If changes are found, a config archive is created which contains the previous configuration's set of files. * Restoration of an old configuration contained in a config archive. * COMPARE.TXT, a report included in each archive, which shows the line-by-line changes between an archived set of old configuration files, and the files that succeeded them. * CHANGES.TXT, a compilation of all the COMPARE.TXT reports generated by PCH since it was first installed. * HISTORY.TXT, a log file which records all PCH operations involving the creation of config archive files. User notes can be added to this file from PCH. * A browse facility that lets you view individual configuration files stored inside archives, as well as CHANGES.TXT and HISTORY.TXT. * A built-in setup menu. PCH requires no external install program. DOCUMENTATION NOTES: You can assign your own drive and directory as ============= ===== the PCH home directory, but the examples in this manual assume that it is C:\HISTORY. All archive file examples here are shown as LZH files. You can also use ZIP files. Screen output normally seen while running PCH is indented with ">" characters. ############### GETTING HELP ############### PCH is really pretty easy to use. Once you get the hang of it, you probably won't have to refer to this document much. To lessen the need for this manual, PCH is equipped with some on-line help. Enter "HISTORY" by itself at the DOS prompt to display a screen of basic options. You can also enter a "HISTORY ?" or "HISTORY /?" to get three screens with more detailed help. PCH also has a number of screens to prompt and inform you as you use the program. In most instances this on-board help should suffice. ############### INSTALLING PCH ############### External Programs ^^^^^^^^ ^^^^^^^^ HISTORY.EXE is the PC Historian (PCH) program. But PCH isn't complete by itself. It needs these two external components to work: 1) FC.EXE The FILE COMPARE program included with MS-DOS. 2) LHA PCH relies on either LHA or PKZIP to perform archiving duties. If you select LHA.EXE, I recommend version 2.12 or (or) later. The old 1.x LHARC program cannot be used. If you use PKZIP, a 2.0 plus version is best. Version 2.04g is PKZIP current as of this writing. PCH should also be able to use PKZIP version 1.1, but not much testing was done with it. If you choose to use ZIP files, both the PKZIP.EXE and PKUNZIP.EXE programs are needed. PATH ALERT!! If you want to avoid problems running PCH, these program ==== ===== MUST BE ON YOUR PC SEARCH PATH!! Since it's part of DOS, chances are pretty good that FC.EXE is already on the path. You can test if a program is on the PATH by trying to run it from a directory other than the one it's in. If it runs, it's because DOS searched the path to find it for you! PCH needs to to find FC.EXE, LHA.EXE, or PKZIP.EXE without "having to look" for them. Getting them onto the search path accomplishes this. Enter "PATH" at your DOS prompt to see what your current PATH is. MS-DOS NOTES PCH should work fine if you're using DOS 5.0 or later. ====== ===== If you need a program like PCH you really shouldn't be using anything older than that! If you do, the GENERATE option which produces the CHANGES.TXT file won't work. Avoid even trying to use PCH with versions of MS-DOS older than 3.1! Their FC.EXE programs won't understand the parameter switches PCH uses. Running PCH Setup ^^^^^^^ ^^^ ^^^^^ PCH must be set up! Except for displaying HELP text, PCH won't let you do any useful work unless SETUP is run first. The command used to call up the PC Historian setup menu is: HISTORY s CURRENT DIRECTORY: Setup only works if HISTORY.EXE is run from the current directory. When you run setup, PCH doesn't try to figure out where you ran it from. It looks for itself in the current directory. If it doesn't find itself there, PCH exits to DOS with an error. NO COMPRESSION: PCH executes its setup by patching itself. If PCH is altered this strategy not only won't work, but might turn HISTORY.EXE into garbage! So PCH checks to see if it's been compressed by a program like PKLITE. If it has, PCH exits to DOS with an error. Once HISTORY.EXE has been set up you can compress it as much as you like. To run setup again, however, you'll need HISTORY.EXE in its original format. The Setup Menu ^^^ ^^^^^ ^^^^ This is what you'll see when HISTORY.EXE's setup menu comes up: > PC Historian (PCH) Setup > > Now Set At: > > (1) PCH Home (Use: Drive:\dirname): none > Directory (Example: C:\HISTORY) > > (2) Windows (Use: Drive:\dirname): none > Directory (Example: C:\WINDOWS) > > (3) Archive ( ...Enter One... ): lha > Utility ( "lha" -or- "zip" ) > > Press 1, 2, or 3 to edit settings, > SPACE to SETUP, or ESC to EXIT to DOS At this menu you can press "1", "2", or "3" to edit the PCH Home Directory, specify your Windows directory, or choose between the LHA or ZIP archive utilities. Nothing serious happens until you press the SPACEBAR to execute your SETUP selections. Hitting the ESC key quits to DOS at any time. Here's more information on each selection: (1) PCH HOME DIRECTORY: Without this HISTORY.EXE won't work. You need to assign a base, or home directory where PCH can operate. You can't choose an existing directory - setup will reject it. Enter a DRIVE letter followed by a COLON, a BACKSLASH, and a DIRECTORY name. For example "C:\HISTORY" would do nicely. Setup strips trailing "\" characters. You have 20 spaces to play with. (2) WINDOWS DIRECTORY: This is an optional setting used, if Windows is installed, to tell PCH where to look for WIN.INI and SYSTEM.INI. It can be changed at any time without affecting the other settings. Enter nothing if you wish to get rid of the windows setting. (3) ARCHIVE UTILITY: This lets you choose either "LHA" or "ZIP" as your choice of the archive utility to use with PCH. Simply enter "lha" or "zip" - setup rejects anything else. As far as PCH is concerned, there's no functional difference between LHA and ZIP. They're included so people can work with what they already use. Completing The PCH Setup ^^^^^^^^^^ ^^^ ^^^ ^^^^^ One more step is needed to finish the PCH installation! HISTORY.EXE is designed to automatically archive an old configuration when a new one is introduced. It does this by checking for config changes when your PC boots up. But before PCH can do this you must add this command line to your AUTOEXEC.BAT file: HISTORY a This command makes PCH check for configuration changes each time you boot your PC. Be sure to locate this command so that it'll run every time the PC boots! Multi-config versions of AUTOEXEC.BAT typically perform branching which result in some lines not being executed. Commands COMMON to all configurations tends to be located at the start and end of AUTOEXEC.BAT. Keep this in mind when adding this command. PCHENVAR.BAT - Setting The PCH Environment Variable ^^^^^^^^^^^^ ^^^^^^^ ^^^ ^^^ ^^^^^^^^^^^ ^^^^^^^^ The DOS environment is a memory space DOS programs use to leave messages for each other. For example, this is where your search PATH is stored. Programs typically check this space for status information. You can see the contents of your DOS environment by entering the "SET" command at the prompt. When a program runs it gets a "child" copy of the DOS "master" environment to work with. HISTORY.EXE doesn't change the DOS master environment. Any change PCH makes in the environment vanishes when the program ends. Although PCH doesn't use the DOS environment for status information, it does include a feature to let you set an environment variable to reflect current configuration status. That feature is PCHENVAR.BAT, a small batch file HISTORY.EXE creates in the PCH home directory each time it checks your PC configuration with the UPDATE or AUTO option. PCHENVAR.BAT simply sets an environment variable called "PCH" to "SAME" or "CHANGED" depending on the outcome of a configuration checking procedure. To add this information to the DOS environment on a regular basis, add the command "CALL C:\HISTORY\PCHENVAR.BAT" to AUTOEXEC.BAT. This should be done just after invoking HISTORY.EXE. If this is done, and the PCH home directory is C:\HISTORY, your AUTOEXEC.BAT entry for PCH would look like: HISTORY a CALL C:\HISTORY\PCHENVAR.BAT ############### PCH DISK DIRECTORIES ############### When the setup option is used to install PCH, it creates this directory structure: : ÃÄÄÄ HISTORY ................ PCH HOME Directory : ³ \ ÃÄÄÄ CURRENT ........ PCH CURRENT SubDirectory Root ³ Directory ÀÄÄÄ WORK ........... PCH WORK SubDirectory The PCH HOME DIRECTORY is used to store archives of old configuration files. It also stored the CHANGES.TXT file, if one has been generated, and the PCH log file, HISTORY.TXT. PCH uses this home directory as the "current" directory most of the time. Despite this, PCH usually exits back to the disk location it was invoked from on the command line. The CURRENT SUBDIRECTORY provides a safe place to store a "reference set" of configuration files like CONFIG.SYS, WIN.INI, etc. This is needed because installation programs sometimes presume to alter your configuration files without asking! When that happens the contents of the CURRENT directory stands ready to alert you to any changes. The line change reports saved to COMPARE.TXT detail the differences found between the contents of these "reference" files with the normal config files used by DOS and Windows. The COMPARE.TXT file in CURRENT is recreated every time PCH checks for configuration changes. I-M-P-O-R-T-A-N-T!!!! NEVER EDIT THE CONTENTS OF THE CURRENT DIRECTORY BY HAND! It defeats the point of the program! PCH can only maintain an accurate config history if you don't go "behind it's back" and directly change the files it relies on! Edit your normal config files instead! PCH is designed to support you in that activity. The WORK SUBDIRECTORY is simply a workspace into which you can extract the contents of an old config archive file for work or study - just like you'd make any other directory for the same purpose. The PCH EXTRACT option automatically uses this location. ############### The AUTO/UPDATE Process ############### The basic activity of PCH is to check for changes in configuration files and to archive old configurations as they are supplanted by newer ones. The idea is to provide a safety net for making config changes. You don't have to worry about making configuration changes when you have a system at work recording these changes for later retreival! PCH features two options to check on configuration changes. The AUTO option is used in AUTOEXEC.BAT and is non-interactive. The UPDATE option is interactive, and is meant to be run from the command line. The advantage of the AUTO process is that it catches changes that happen when you're not looking. The advantage of the UPDATE process is that it lets you take the initiative and get involved. You can leave notes to yourself that are useful in figuring things out later out. > ÜÜÜÜ ÜÜÜÜ > ÛÛ ÛÛ Û Û Ü ÛÛ ÛÛ Ü > ÛÛ ÛÜ ÜÜÜ ÜÜÜ Û Ü Ü ÜÜ ÜÜ ÛÛ ÜÜÜ ÜÜ ÜÜ Ü ÜÜ > ÛÛ ÜÜ Û Û ÛÜ Û ÛÛ Û Û Û Û Û ÛÛ ÜÜ Û Û Û Û ÛÜ Û Û Û > ßÛÜÜÛß Û Û ÛÜÜ ÛÜÜ Û Û Û Û Û ÛÜÛ ßÛÜÜÛß ÛÜÛ Û Û Û Û ÛÜÛ Ü Ü Ü > ÜÜÛ ÜÜÛ These actions are taken by the AUTO and UPDATE checking options: ========== ALWAYS DONE: ========== 1) Comparisons are made between the config reference set in CURRENT subdirectory and the normal DOS and Windows configuration files. In the process a new copy of COMPARE.TXT is generated inside the CURRENT subdirectory. - If no changes are found in AUTO mode, PCH ends without action. - If no changes are found in UPDATE mode, PCH displays a brief screen message saying that no changes were found, and exits. > ÜÜÜÜ ÜÜÜÜ Ü > ÛÛ ÛÛ Ü ÛÛ ÛÛ Û ÛÛÛ > ÛÛ ÜÜÜ ÜÜ ÜÜ Ü ÜÜ ÛÛ ÛÜ ÜÜÜ ÜÜ ÜÜ ÜÜÜ ÜÜ ÛÛÛ > ÛÛ ÜÜ Û Û Û Û ÛÜ Û Û Û ÛÛ ÜÜ Û Û ÛÜÛ Û Û Û Û ÛÜ Û Û ßÛß > ßÛÜÜÛß ÛÜÛ Û Û Û Û ÛÜÛ ßÛÜÜÛß Û Û Û Û Û Û ÛÜÛ ÛÜÜ ÛÜß ß > ÜÜÛ ÜÜÛ ß ========== DONE ONLY IF CHANGES ARE FOUND: ========== 1) The contents of the CURRENT subdirectory, complete with the COMPARE.TXT report, are stored in a config archive file. A name based on the current date is assigned to this archive. 2) The name of the newly created archive, and a time/date stamp, is inserted into a banner at the start of the COMPARE.TXT file inside the archive. 3) The content of the CURRENT directory is deleted. Configuration files from the disk at large are copied into CURRENT as the new "reference set" of configuration files. 4) An entry is made in the PCH HISTORY.TXT log file which shows the name of the newly created config archive, date & time, and the kind of PCH operation used in the process. If the AUTO option was used, the computer flashes and beeps for a couple of seconds to let the user know that something happened, and then exits PCH. 5) The UPDATE option, at this point, offers the user a chance to add a personal three line note into the HISTORY.TXT log file entry. 6) The COMPARE.TXT report created for the new config archive is displayed for browsing. 7) PC Historian exits with a brief screen summary of actions taken. ############### NAMING CONFIG ARCHIVES ############### PCH uses the current date to assign a name to new config archive files. The LZH or ZIP extention is applied, depending on the archive utility in use. The filename format is: Year Month Day Extention 95.....03....21 (LZH or ZIP) So an archive created by PCH on April 28, 1995 would be 950428.LZH, if LHA is being used. But what if an archive already exists for that day? Then PCH tacks on the letter "A" to make 950428A.LZH. If an archive ending in "A" exists, PCH uses "B", and if a "B" file exists, then "C" is used, and so on. If "Z" is reached, ASCII characters from 128 to 254 are used in place of letters. This provides for over 150 config updates a day. That's probably enough for most of us! This naming scheme lets users quickly identify the order in which archives were created. It also makes a list of archives sorted by filenames produce the same order as sorting them by date and time. ############### SPECIFYING FILES ############### PCH moves into its HOME directory, and uses it as the CURRENT directory while operating. PCH therefore assumes that any file specified without a path must exist in the PCH home directory. If it isn't found there, PCH exits to DOS with an error message. But this doesn't mean that you can only specify files that exist in the PCH home directory. The browse command can be used to browse any text file on the disk - IF you include the path which leads to the desired file. For example, this command: HISTORY b C:\EDIT\ADDRESS.TXT Can be used to browse the ADDRESS.TXT file from the C:\EDIT directory. CAUTION! - Don't try this with config archives! PCH manipulates these files in ways that will fail, or at best become unpredictable, if you attempt to access them outside the PCH home directory. MISSING PIECES: PCH supplies some of the missing pieces for you when you specify archive files. If the path of the PCH home directory isn't included on the command line, PCH supplies it internally. PCH will also supply a missing archive file extension. Assuming that C:\HISTORY is the home directory, these four command line entries are equivalent: 950324 950324.LZH C:\HISTORY\950324 C:\HISTORY\950324.LZH ############### BROWSING FILES IN PCH ############### PCH includes a BROWSE command which lets you examine various parts of your PCH support system. The simplest form of the browse command is: HISTORY b This displays a FILE LIST of the config archives in the home directory. Viewing Configuration Files Inside Archives ^^^^^^^ ^^^^^^^^^^^^^ ^^^^^ ^^^^^^ ^^^^^^^^ When used with an archive filename, the browse command displays the COMPARE.TXT report contained in that file. For example, the command "HISTORY b 950428.LZH" would be used to look at the COMPARE.TXT file in the 950428.LZH config archive. The browse command also lets you view the other configuration files contained in old config archives. These file include AUTOEXEC.BAT, CONFIG.SYS, and if Windows is installed, WIN.INI, and SYSTEM.INI. As shown below, viewing these files is done simply by following the name of the config archive with the initial of the file you wish to view. THIS COMMAND: DOES THIS . . . . . ==== ======= ==== ==== HISTORY b 950428 a Displays the AUTOEXEC.BAT file in 950428.LZH. HISTORY b 950428 c Displays the CONFIG.SYS file in 950428.LZH. HISTORY b 950428 s Displays the SYSTEM.INI file in 950428.LZH. HISTORY b 950428 w Displays the WIN.INI file in 950428.LZH. HISTORY b 950428 Displays the COMPARE.TXT file in 940428.LZH. Below is the partial image of a screen in which the start of the WIN.INI file contained in the 950426A.LZH archive is being viewed. The command used to produce this display was "HISTORY b 950426A w" > [windows] > spooler=yes > load=d:\setspeed.exe setfont.exe > run=C:\HERCULES\WINSTALL.EXE > Beep=yes > NullPort=None > BorderWidth=8 > CursorBlinkRate=530 > DoubleClickSpeed=452 > Programs=com exe bat pif > Documents= > DeviceNotSelectedTimeout=15 > TransmissionRetryTimeout=45 > KeyboardDelay=2 > KeyboardSpeed=31 > ScreenSaveActive=1 > ScreenSaveTimeOut=900 > CoolSwitch=1 > device=HP DeskJet 500,HPDSKJET,LPT1: > > >> WIN.INI in 950426A.LZH ANY KEYúúView ESCúúQuit << At the bottom of the screen is a status line indicating that you're viewing the WIN.INI file from the 950426A.LZH archive. You can either choose to hit ANY KEY to view the next screen, or press the ESC key to exit to DOS. Every time a key is hit PCH displays the next 20 lines in the file. This creates an overlap of three lines between screens. Browsing CHANGES.TXT & HISTORY.TXT ^^^^^^^^ ^^^^^^^^^^^ ^ ^^^^^^^^^^^ CHANGES.TXT and HISTORY.TXT are two files of special significance that reside in the PCH home directory. To make viewing them easy, two shorthand command are provided as shown here: USE THIS: TO DO THIS . . . . === ==== == == ==== HISTORY bc Display the CHANGES.TXT file. HISTORY bh Display the HISTORY.TXT file. The browse command's last trick is that it can be used to view any text file on your disk - provided you supply the path information PCH needs to find it. This can be useful for looking at configuration file in the disk as large. For example the command below would be used to browse the WIN.INI file in the C:\WINDOWS directory. HISTORY b c:\windows\win.ini ############### THE COMPARE.TXT FILE ############### The COMPARE.TXT file is the most powerful tool PCH provides to help you make sense of what's happening from one configuration to the next. A COMPARE.TXT file is generated in the PCH CURRENT directory every time PCH checks your configuration with the AUTO or UPDATE options. This file is scanned in order to determine if config changes have occured. When the contents of COMPARE.TXT report that no changes have occured, PCH moves on, taking no further action. But any change between the set of "reference" files in the CURRENT directory and the normal config files appears in COMPARE.TXT. PCH uses these changes to trigger an update mechanism which creates a new config archive. The COMPARE.TXT file created at that time is stored in the newly created archive. A note about comparisons. What PCH does is assure that redundant files don't pile up in your configuration history. If you have the same exact set of config files all summer long, PCH isn't going to add any new config archives. What PCH doesn't do is artificial intelligence! It makes no attempt to discern what constitutes "meaningful" change. The difference of a single line will set off the update cycle. FC.EXE - The DOS FILE COMPARE Program ^^^^^^ ^^^ ^^^ ^^^^ ^^^^^^^ ^^^^^^^ The actual line change information for each config file is generated by the MS-DOS FC.EXE program. PCH assembles and formats this information to created COMPARE.TXT. The output of FC.EXE program isn't changed, however, only packaged. So if you want another reference on how to read a COMPARE.TXT file, consult a DOS book which covers FC.EXE. PCH runs FC.EXE with two parameters: /C and /N. The "/C" parameter tells the program to ignore case when making comparisons. Upper or lower, it doesn't matter. The reason for this is simple. DOS doesn't care what case its command are in - so why should we? The "/N" parameter tells FC.EXE to include the line numbers of text it reports on. This is done as a convenience for users. It's helpful to know, for example, that the line you need to change is the 45th line in a file you're editing. FC.EXE considers files to be back in "synch" if two lines in a row match. This prevents a single line deleted at the start of a file from causing spurious mismatches all the way down the length of both files! In other words FC.EXE is smart enough to only bother showing what's really been changed. If more than 100 consecutive line don't match, FC.EXE aborts the comparison with an error message. While you won't get specific line information in such cases, COMPARE.TXT displays the error message. This is usually appropriate. If two files are so different that 100 consecutive lines fail to match it's often because you're trying to compare apples and oranges. An incorrectly named file is a typical cause for this sort of thing. Reading COMPARE.TXT ^^^^^^^ ^^^^^^^^^^^ As shown below, FC.EXE shows each change by setting off two sets of lines - one from each file. The top and bottom line in each set are the same. These lines bracket, in effect, the changes between files. Comparing files AUTOEXEC.BAT and C:\AUTOEXEC.BAT . Files Compared ***** AUTOEXEC.BAT . . . . . . . . . . . . . Name of 1st file 1: @echo off . . . . . . . . . . . . . Start "Bracket" line 2: C:\HERC\POWERHZ . . . . . . . . . . . . . End "Bracket" line ***** C:\AUTOEXEC.BAT . . . . . . . . . . . . . Name of 2nd file 1: @echo off . . . . . . . . . . . . . Start "Bracket" line 2: set cfig=4 ......................... THIS IS DIFFERENT! 3: C:\HERC\POWERHZ . . . . . . . . . . . . . End "Bracket" line ***** In COMPARE.TXT the file without the path is always from the "reference" file set in the PCH CURRENT directory. Here "AUTOEXEC.BAT" refers to C:\HISTORY\CURRENT\AUTOEXEC.BAT, assuming that C:\HISTORY is the PCH home directory. Of course the second file is the AUTOEXEC.BAT file in the root of drive C - the one actually being used to boot the PC! There is a banner at the beginning of each COMPARE.TXT file which bears the name of the archive file it's associated with. There are as many COMPARE.TXT files as config archives, but this banner always tells you where the file comes from. A time/date stamp is also included with the banner. In COMPARE.TXT each configuration file gets a section of its own. As shown below, these sections are marked off by a dashed line which bears the name of the file being compared. @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 950428.LZH @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ (Date: 04-28-1995 *-*-* Time: 07:03:14) -- AUTOEXEC.BAT ------------------------------------------------------------- Comparing files AUTOEXEC.BAT and C:\AUTOEXEC.BAT FC: no differences encountered --- CONFIG.SYS --------------------------------------------------------------- Comparing files CONFIG.SYS and C:\CONFIG.SYS ***** CONFIG.SYS 1: menuitem=CD, DOS 6.2/EMM386/CD Oui, EMS Non! : : Stripping Out EOF Markers ^^^^^^^^^ ^^^ ^^^ ^^^^^^^ Occasionally you may see a "^Z" in COMPARE.TXT files. This stands for CONTROL+Z, also known as the ASCII 26 character. You may have seen it as a right facing arrow at the end of a text file when viewed in a file browser. Most programs that use text files treat "^Z" as the EOF, or end-of-file, marker. This is something of a DOS tradition, in fact. Because it's supposed to mark the end-of-file, such programs don't "see" past the ASCII 26 character in the files they use. FC.EXE sends ASCII 26 characters along with the rest of it's output, even when comparing ASCII files! PCH can't deal with this behavior, so it hunts down ASCII 26 characters and translates them as "^Z". When you see a "^Z" in a COMPARE.TXT file, it's a sign that the EOF character for the file was reached on that line. ############### THE CHANGES.TXT FILE ############### CHANGES.TXT is a compilation of of all the COMPARE.TXT files created by PC Historian since it was first installed. It is a complete record of the line changes in configuration files since PCH began operating. To generate a new copy of CHANGES.TXT use this command: HISTORY g Using "HISTORY g" overwrites a previous version of CHANGES.TXT. If one exists you'll be prompted to make sure that it's OK to do so. When a CHANGES.TXT is created, a screen's worth of notes is included at the start of the file to provide some explanation of it's contents. In CHANGES.TXT, COMPARE.TXT reports are listed in reverse chronological order. The most recently created file appears at the start. This reflects the fact that users are typically concerned with the recent changes made to their PCs. Each COMPARE.TXT file is set off by it's own banner. A line is added at the end of each file for appearances, but the content of each file isn't changed. To provide further clarification, a COMPARE.TXT file created by restoring an old config contains additional information in a header following the archive banner. If you need to hunt for the missing explanation of what's gone south with your PC setup over the last month, CHANGES.TXT can be a big help! ############### THE HISTORY.TXT FILE ############### HISTORY.TXT is PC Historian's operation log file. It contains a record of all actions PCH performs which create configuration archive files. These types of PCH operations are logged in HISTORY.TXT: AUTO: The automatic config update process usually performed in AUTOEXEC.BAT at bootup. UPDATE: The interactive config update process started by the user at the DOS command line. OLD: An interactive process started from the command line. The OLD option is used to restore an old configuration archive file as the currently active PC configuration. The first entry in HISTORY.TXT records when PCH was installed, and the location of the PCH home directory. Every subsequent entry lists this information: * TYPE: The type of PCH Operation executed (Auto, Update, Old). * NAME: The name of the PCH config archive file created, or used. * DATE: The date the operation took place. * TIME: The time the operation took place. If an OLD config is restored, HISTORY.TXT also records the archive in which the displaced files were saved, or that they were discarded. Leaving Notes in HISTORY.TXT ^^^^^^^ ^^^^^ ^^ ^^^^^^^^^^^ Users can leave a note in HISTORY.TXT up to three lines long when using the UPDATE or OLD options. This possibility doesn't apply to the AUTO option, since it's not interactive. A sample section of a HISTORY.TXT file is shown here: ========== Sample Section of a HISTORY.TXT File: ========== * INSTALL: PC Historian is installed in c:\history. (Date: 04-25-1995 *-*-* Time: 17:32:04) Note: Current set of PC config files copied to c:\history\current. * AUTO: 950427.LZH stored. New config files from disk copied to CURRENT. (Date: 04-27-1995 *-*-* Time: 18:15:27) * UPDATE: 950428.LZH stored. New config files from disk copied to CURRENT. (Date: 04-28-1995 *-*-* Time: 09:13:32) Note: Installed MIND INJECTOR 5.0. I'm not sure about this package, but ^^^^ at least I'll know how to get rid of it! * OLD: 950427.LZH restored. Displaced config stored in 950428A.LZH. (Date: 04-28-1995 *-*-* Time: 22:52:18) Note: Spent the day with MIND INJECTOR and my head hurts! I've getting ^^^^ rid of this thing! But I'll hang onto the config, just in case I decide to change what's left of my mind later. The point of leaving notes in HISTORY.TXT is plain. Files like HISTORY.TXT create a running record of the changes your PC has been through. When problems arise, you'll want to return to this record as a way of making sense of what's happening. PCH can record filenames and the date and time, but only YOU can leave notes to YOURSELF! Only you are going to know WHY an action was taken. For this reason it's a good policy to use PCH's UPDATE option, rather than AUTO. The AUTO option is really intended to be a safety valve - if unplanned changes happen, at least PCH records them! But UPDATE gives you a chance to take the initiative and enrich the record PCH creates with your own comments. After the OLD or UPDATE routines have made the initial entry, you are fiven a chance to add your own note to HISTORY.TXT. These are the rules for making these entries: * You can enter up to three lines 70 characters in length. (Anything longer is thrown away.) * Use the BACKSPACE or LEFT keys to back up on a line. * Press RETURN at the end of a line to enter it. (Once that's done you can't return to change it!) * You can quit at any time by entering an empty line. Remember, HISTORY.TXT is just an ASCII text file. You can call the file up in a text editor and include additional notes whenever you like. If you do, it's a good idea to keep a copy of HISTORY.TXT somewhere safe. You'll also want to avoid changing time/date or file information in the process - that only pollutes the file as a reliable record. Avoid using a word processor to edit the file. Changing HISTORY.TXT into say, a Word Perfect file, is a big no-no! ############### RESTORING AN OLD CONFIGURATION ############### You can use the PCH OLD option to restore the configuration contained in an old archive file. This is the reverse of the UPDATE process. In UPDATE, files move from the CURRENT subdirectory into an archive to make way for new files from the disk at large. With the OLD option, an archive's files are moved into the CURRENT directory and then copied out into the disk at large, thereby restoring it as the current config. SAVE THE DISPLACED CONFIG? When you select PC Historian's OLD configuration option, PCH gives you a chance to save the current config into it's own archive - in case you wish to retrieve it later. Two sets of actions are listed below. The first shows the steps PCH takes if you discard the current config when restoring an OLD configuration. The second shows what happens if you decide to save the current config. ========== DONE IF YOU DISCARD THE CURRENT CONFIG: ========== 1) The existing contents of the CURRENT directory are deleted. The contents of the OLD archive being restored are copied into the CURRENT subdirectory. 2) DOS and Windows config files in the disk at large are copied over by the config files from the old archive file selected. 3) An entry is made in the HISTORY.TXT log file showing the type of operation and a time/date stamp. The user is offered a chance to add a personal note. 4) PCH exits with a message summarizing the actions taken and a note reminding the user to REBOOT THE PC to enable the new (old) config. ========== DONE IF YOU SAVE THE CURRENT CONFIG: ========== 1) A temporary directory called "~~OLD" is created. The archive containing the old config to restore is extracted into it. 2) A comparison is run between the config files in the CURRENT and ~~OLD subdirectories. This process generates a new COMPARE.TXT file in the CURRENT directory. 3) The contents of the CURRENT directory are saved to an archive. The name of the new archive, and a time/date stamp, is inserted into a banner at the start of the COMPARE.TXT file inside this archive. A note, like the one shown below, is added. It names the old archive file whose files were used to supplant the current configuration. N-O-T-E!! This OLD CONFIG ARCHIVE RESTORED: 950427.LZH When the old 950427.LZH file was restored, the config it displaced & this COMPARE.TXT report were, at user request, saved to the archive named in the banner above. This report shows line-by-line differences between these file sets. Files from the incoming 950427.LZH archive were temporarily copied to the ~~OLD directory to make this comparison. 4) The existing contents of the CURRENT directory are deleted. The contents of the OLD archive being restored are copied into the CURRENT subdirectory. 5) The contents of the temporary "~~OLD" directory are deleted and the "~~OLD" directory is removed. 6) DOS and Windows config files in the disk at large are copied over by the config files from the archive file selected. 7) An entry is made in the HISTORY.TXT PCH log file showing the type of operation and a time/date stamp. The user is offered a chance to add a personal note. 8) The COMPARE.TXT file from the configuration displaced by the old config, but saved in the process, is presented for browsing. 9) PCH exits with a message summarizing the actions taken and a note reminding the user to REBOOT THE PC to enable the new (old) config. ############### EXTRACTING CONFIG ARCHIVES ############### HISTORY.EXE includes a command to extract the contents of a config archive file into the PCH WORK subdirectory. That command is: HISTORY e filename where "filename" is the name of the config archive to extract. Don't forget, you can use the "HISTORY b" browse command to view a listing of available archive files. As shown below, PCH displays the contents of the PCH WORK directory when the extract command is used. A warning is then displayed and you are given the option of proceeding with the extraction, or exiting to DOS. > Directory of C:\HISTORY\WORK . . . > > . . 950426E .LZH AUTOEXEC.BAT > CONFIG .SYS WIN .INI SYSTEM .INI COMPARE .TXT > 29380608 Bytes free > > WARNING! > > PC Historian's EXTRACT option will delete the contents of the > PCH WORK subdirectory shown above. PCH then extracts files > from the archive you've specified into the WORK directory. If you decide to proceed with the extraction PCH replaces the old contents of the PCH WORK directory with the contents of the archive being extracted. As shown below PCH ends by displaying the new contents of the WORK directory and a brief message. > New Directory of C:\HISTORY\WORK . . . > > . . 950427 .LZH AUTOEXEC.BAT > CONFIG .SYS WIN .INI SYSTEM .INI COMPARE .TXT > 29380608 Bytes free > > The 950427.LZH config archive has > been extracted in C:\HISTORY\WORK. > > C:\HISTORY\WORK> _ Unlike other PCH commands, extract doesn't return to the directory PCH was invoked from. PCH assumes you're interested in working with the files just extracted, so it exits into the PCH WORK directory instead. ############### WHEN PROBLEMS OCCUR ############### Error Messages ^^^^^ ^^^^^^^^ Most of the errors that occur when using PCH take place because the user enters incorrect information on the DOS command line. When that happens PCH usually displays the message shown here, and exits to DOS. > ERROR! . . . PC Historian > ===== > A parameter or filename might be bad, or missing. > > For HELP enter "HISTORY" or "HISTORY ?" at the DOS prompt. > For a complete reference on PC Historian run the HISTHELP > program included with the original PCH archive package. Trouble Shooting ^^^^^^^ ^^^^^^^^ Here are some things to check when problems occur: * Check your command line entry for typos. * Use "HISTORY b" to make sure the file you've asked for exists. * Run "HISTORY ?" to consult the on-line help. * Run HISTHELP to consult this manual. * Check your system's search PATH. Are you certain that FC.EXE and LHA.EXE (or PKZIP.EXE and PKUNZIP.EXE) are on the PATH? * Run "HISTORY s" and view the setting in the SETUP menu. Do they match the locations of your existing PCH home directory, Windows directory, or the archive utility you use? If garbage is displayed under the "Now Set At" prompt, HISTORY.EXE might be corrupt and need to be replaced. * Check for system problems. Have you run out of disk space? Is there a temporary system condition which can be fixed by REBOOTING your PC and running PCH again? ------------------ End of PC Historian Manual --------------------