CD-ID (tm) CD-ROM Diskette Identification Program for use with So Many CD's (a PCBoard PPE) Copyright (C) 1990-94 All Rights Reserved by KEY SOFTWARE PRODUCTS 440 Ninth Avenue Menlo Park, California 94025-1802 BBS/FAX: 415-364-9847 TABLE OF CONTENTS CHAPTER 1 - INTRODUCTION ........................... 1 CHAPTER 2 - CD-ID COMMAND LINE PARAMETERS ............. 2 2.1 Determining the CRC of a CD-ROM diskette ......... 2 2.2 Using CD-ID to create a Batch File ............... 2 CHAPTER 3 - INSTALLING CD-ID ........................ 5 CHAPTER 4 - DESIGNING THE PCBOARD DISPLAY FILE ......... 6 4.1 Displaying the CD-ROM Title ................... 6 4.2 Displaying a Flashing Marker .................. 6 Apr 24, 1995 CD-ID 1 CHAPTER 1 - INTRODUCTION CD-ID is used to uniquely identify which of several possible CD-ROM diskettes is currently loaded on a given CD-ROM drive. As explained below, it is used in conjunction with a set of environment variables to modify what the file CNFN displays so that callers will know which CD-ROM diskette(s) are presently online. CD-ID computes a 32-bit CRC code from the contents of the root directory of a disk. The name of every file and subdirectory found in the root, together with their associated date, time, and size are used in the CRC computation. This virtually guarantees that each CD-ROM diskette will have a unique identifying CRC. Copyright (C) 1990-94, Key Software Products. All Rights Reserved Apr 24, 1995 CD-ID 2 CHAPTER 2 - CD-ID COMMAND LINE PARAMETERS There are two ways to use CD-ID: 2.1 Determining the CRC of a CD-ROM diskette To simply determine the 32-bit CRC of a particular CD-ROM diskette, insert the diskette in a CD-ROM drive and enter the command: CD-ID where "" is the drive letter of the CD-ROM drive. For example, if the CD-ROM diskette is in drive "E:", enter the command CD-ID E: This will cause CD-ID to read the root directory of drive E:, compute and then display the corresponding 32-bit CRC as an eight-digit hex number. Do this for every CD-ROM diskette you have, and make note of their CRC "ID" codes. 2.2 Using CD-ID to create a Batch File Once you have determined the CRC codes of all of your CD-ROM diskettes, you can put that (and other) information in a configuration file and ask CD-ID to identify which diskette is currently loaded in a particular drive. The format of the CD-ID command line would be: CD-ID The configuration file is a text file with one line per diskette. Each line contains three fields (separated by blanks) in the following format: where "<name>" is the name of the environment variable to be associated with this CD-ROM diskette, "<crc>" is the 32-bit CRC for this diskette determined previously by CD-ID (see above), and "<title>" is a text description of the diskette. For example, such a file might look like: Copyright (C) 1990-94, Key Software Products. All Rights Reserved Apr 24, 1995 CD-ID 3 @11@ 0FF47D97 Cica Shareware for Windows @12@ 85635923 Windows Expert @13@ 6FBC5DEF Windows Platinum @14@ 14D4462B Dr. Windows @15@ FAD64426 Dr. Shareware @16@ D39F5C07 So Much Shareware 2 @17@ FAED44A3 So Much Shareware 4 @18@ 8B256D46 PC SIG Library 13th ed. @19@ B6B4C49A Simtel-20 Internet Archives @20@ 5E4BA328 C Users Group Library @21@ 1518D62D Hobbes OS/2 Collection @22@ 4C7436DD The Original Shareware @23@ 4C8E26F5 So Much Shareware 5 @24@ 3BB1CECE NightOwl Shareware V15 @25@ 9F67A15F So Much Modem Madness 2 @26@ 739B3516 NightOwl Shareware V13 @27@ 3A58395C So Much for Windows & OS/2 @28@ A04AD218 NightOwl Best of BBS @29@ 2CF46196 So Much Modem Madness 1 Note that the environment variable names start and end with "@". This is intentional so as to be compatible with use of the PCBoard "ENV" macro for displaying the text of an environment variable, as in @ENV=11@ This causes the value of the environment variable named @11@ to be displayed whereever @ENV=11@ appears in a PCBoard display file. When CD-ID reads the configuration file, it writes the same number of lines to a file called CD-ID.BAT using the following format: SET <name>=<value> where "<name>" is the name of the environment variable from the corresponding line of the configuration file. All but one of the lines in this batch file will set their environment variables to an empty string, thus effectively removing those variables from the environment. If one of the lines in the configuration file specifies a CRC value that matches that of the CD-ROM diskette, the value of the corresponding environment variable will be set to the string specified by the third command line parameter: <marker>; in addition, a special environment variable named @<drive_letter>@ will be set to the value of <title> taken from the matching line of the configuration file. Using the example configuration file given earlier, if the Copyright (C) 1990-94, Key Software Products. All Rights Reserved Apr 24, 1995 CD-ID 4 current diskette in CD-ROM drive "D:" is NightOwl Shareware V15, then the command CD-ID D: CD-ID.CFG * will create the file CD-ID.BAT with the following contents: SET @11@= SET @12@= SET @13@= SET @14@= SET @15@= SET @16@= SET @17@= SET @18@= SET @19@= SET @20@= SET @21@= SET @22@= SET @23@= SET @24@=* SET @D@=NightOwl Shareware V15 SET @25@= SET @26@= SET @27@= SET @28@= SET @29@= Copyright (C) 1990-94, Key Software Products. All Rights Reserved Apr 24, 1995 CD-ID 5 CHAPTER 3 - INSTALLING CD-ID To update the environment variables automatically, you must add the following two lines at the begining of your BOARD.BAT file that runs PCBoard: CD-ID <drive_letter> <config_filespec> <string> CALL CD-ID.BAT IMPORTANT! Be careful to include the ".BAT" filename extension in the second line, or else DOS may simply run CD-ID.EXE again instead of calling the batch file! Copyright (C) 1990-94, Key Software Products. All Rights Reserved Apr 24, 1995 CD-ID 6 CHAPTER 4 - DESIGNING THE PCBOARD DISPLAY FILE There are two ways to use the environment variables created by CD-ID: 4.1 Displaying the CD-ROM Title To display the title of the CD-ROM diskette currently loaded into CD-ROM drive "D:", use the PCBoard macro @ENV=D@ E.g.: Current CD-ROM Online: @ENV=D@ 4.2 Displaying a Flashing Marker If your CNFN display file lists the CD-ROM diskette titles and their associated conferences, it is sometimes helpful to "mark" the ones that are currently online. Unfortunately, the PCBoard display macro ENV displays the corresponding environment variable's text EXACTLY. I.e., if you set an environment variable called "@11@" using SET @11@=@X7E then the string @X7E (not the intended color) will be displayed. Thus, you cannot highlight or flash one of several CD-ROM diskette names using this technique. You can, however, turn on flashing before displaying the text of the environment variable, and turn off the flashing after. For example, if the same environment variable is set to an asterisk using SET @11@=* then the following sequence of PCBoard display macros @XF1@ENV=11@@X7F causes the asterisk to be displayed in flashing dark blue on a grey background, but restores the attribute to white on grey for any text that follows. If environment variable @11@ does not exist (set to the empty string), then no flashing marker will be displayed. Copyright (C) 1990-94, Key Software Products. All Rights Reserved