SysCap Copyright (c) 1995 by Gregory A. Wolking First published in PC Magazine, April 25th 1995, US Edition --------------------------------------------------------------------- SysCap is a program that captures the current screen image and writes that image to the file you specify. SysCap is a "dual-mode" program; you can either run it directly from the DOS prompt or use a DEVICE= statement in your CONFIG.SYS file to capture the screen while DOS processes the file. SYSTEM REQUIREMENTS ------------------- Any IBM PC or compatibile running DOS 3.3 or higher. To install SysCap, just copy the SYSCAP.EXE file to any directory that's included in the DOS PATH and is on a drive that is immediately accessible when your system boots. GENERAL OPERATION ----------------- To use SysCap from the command line, the syntax is SYSCAP [filespec] [switches] To use SYSCAP as a device driver, simply add a DEVICE=d:\path\SYSCAP.EXE [filespec] [switches] statement to your CONFIG.SYS file immediately following the DEVICE= statement for any other device driver whose output you want to capture. Note that SysCap can be loaded "high" with DEVICEHIGH=, but there is no need to do so. SysCap does not remain resident in memory, so it will not affect your system's memory configuration. This behavior makes SysCap an excellent diagnostic tool; you can capture and examine the screen output from other device drivers without altering your system's setup. SysCap will handle most text screen modes (i.e., color or monochrome, 25, 43, or 50 lines, 40 or 80 columns). If the display is in a mode that SysCap doesn't recognize, it will simply shut down without taking any action except to report the error (see ERROR CONDITIONS below). All of SysCap's command line parameters are optional. When installed (or run) with no parameters, SysCap will: 1. Capture the text of the current screen to a buffer in memory. 2. Convert any embedded control codes (ASCII 31 or lower) to periods. 3. Remove trailing spaces from each line. 4. Terminate each line with a CR/LF. 5. Write the buffer to the file SYSCAP.TXT in the current directory, which SysCap will overwrite if it already exists. Note that SysCap only captures the text of the screen image; it makes no attempt to duplicate the screen colors. COMMAND LINE PARAMETERS ----------------------- The following command-line parameters alter SysCap's default behavior. You may enter these parameters in any order, using either upper or lower case, but you must separate the filespec from the parameters by at least one blank space or tab. SysCap treats any string of characters that does not begin with a slash as a filespec. If you list more than one filespec on the command line, SysCap will use the last one on the line. SysCap ignores any switches that aren't listed below, as well as any additional characters after the switch letter (e.g., SysCap treats "/APPEND" the same as "/A"). Finally, if the filespec is longer than 64 characters, SysCap will ignore it an use the default "SYSCAP.TXT". [filespec] Specifies the file in which you want SysCap to store the captured screen. When you load SysCap as a device driver, keep in mind that DOS is still initializing itself so it is risky to specify logical drives (such as RAM disks) that are created by other DEVICE= statements as well as any of the "standard" DOS devices (e.g., CON, PRN, LPT1:, etc.). On _some_ systems, you may be able to use "PRN" or "LPT1:" to have SysCap dump directly to your printer in device-driver mode, but have a boot diskette handy if you decide to try. On the other hand, you _can_ use "SYSCAP PRN" to print the screen from a batch file, almost as if you had pressed the Print Screen key. The biggest difference is that SysCap will filter the screen text (unless you use the /V switch) so that embedded control characters won't drive your printer crazy. /A (Append) Appends to the capture file instead of erasing it. When appending, SysCap will add a short row of dashes to separate the screens. /C (Clear screen) Clears the screen and homes the cursor after capturing the image. This is useful if you plan to capture the output from more than one device driver without getting them mixed together. If the display is not in text mode when SysCap executes, this switch has no effect. /F (Form Feed) Appends a formfeed character (ASCII 12) to the end of the capture file. Useful if you have a laser printer to eject the page after printing. /T (Trim) Removes trailing blank lines from the end of the capture file. /V (Verbatim) Captures the entire screen without formatting, producing one long stream of text corresponding directly to the number of characters on the screen. This switch overrides /T. Since control characters (ASCII 31 and below) will not be converted to periods, TYPEing a verbatim capture could produce strange results. For example, an EOF character (Ctrl-Z, which appears as a right-arrow on the screen) would cause TYPE to stop displaying the file at that point. However, embedded EOF's will _not_affect the operation of the /A switch since SysCap always appends to the physical end of the capture file without regard to its contents. Finally, /V does not override /F (form feed). /? (Help) Displays a short help screen. SysCap ignores /? when operating as a device driver. ERROR CONDITIONS ---------------- SysCap tests for the following errors: 1. The screen is not currently in a text mode, or is in a text mode that SysCap doesn't recognize (e.g., other than 25, 43, or 50 lines). 2. SysCap cannot create the capture file (e.g., the name you gave is invalid, the directory does not exist, the disk is full, the file is marked hidden or read-only, etc.) 3. A disk error occurred while writing to the capture file. If these errors occur when you load SysCap as a device driver, it will generate an "Error in CONFIG.SYS" message. If they occur when you run SysCap from the command line, it will set the DOS ERRORLEVEL according to the list above. Also, if you should get the famous "Abort, Retry, Fail?" prompt from DOS, answering "Abort" will _not_ set the DOS ERRORLEVEL. This is because the "Abort" response tells DOS to terminate SysCap immediately, so it never gets a chance to set the ERRORLEVEL. If you answer "Fail", then SysCap will set ERRORLEVEL appropriately. LIMITATIONS ----------- The biggest limitation is that when used as a device driver, SysCap cannot take effect until DOS begins processing CONFIG.SYS. Therefore, it will not be able to capture the screen output from adapter cards that are initialized during the POST unless that output is still on the screen when CONFIG.SYS runs. Similarly, if you are using MS-DOS's multi-config menu option, you will not be able to capture any information that's on the screen before DOS displays the menu since DOS does not begin processing DEVICE= statements until after you have made your menu selection. For example, some system BIOSs (such as AMI) display a configuration summary after the POST is complete. If you wish to capture this information, you cannot use DOS's multi-config menu option and SysCap must be the first DEVICE= statement in the CONFIG.SYS file. ------------------------------------------------------------------------ Gregory A. Wolking is the Primary SysOp for the Utilities/Tips forum on ZiffNet's PC MagNet. ------------------------------------------------------------------------