An Ounce Of Prevention (tm) File Protection and Recovery System for DOS User Manual 1.0 Pete Maclean Software P. O. Box 591359 San Francisco, CA 94159-1359 An Ounce Of Prevention, software and user manual, are Copyright 1991 by Pete Maclean. All rights reserved. An Ounce Of Prevention is a trademark of Pete Maclean. Other product names mentioned in this manual are trademarks of their respective vendors. Acknowledgments --------------- An Ounce Of Prevention was designed by Pete Maclean and Stan Brin from an idea by Stan Brin. The programs were written by Pete Maclean. The manual was written by Stan Brin and Pete Maclean. Thanks are due to Joann, Bill, David, Peter and Ken. Special thanks are due to Nick Hammond of FBN Software. About The Author ----- --- ------ Pete Maclean is an expert in computer networking, and also dabbles in utilities, operating systems and other areas. He is known for his PC Magazine utilities Emma and Pandora, and is currently a contributing editor to Network Computing magazine. A native of Scotland, Mr. Maclean is a long time resident of San Francisco, where he works as a network consultant, writer and independent software developer. Table Of Contents ===== == ======== Page Introduction Why you need An Ounce Of Prevention . . . . . . . . . . 4 What An Ounce Of Prevention does for you. . . . . . . . 5 List of files . . . . . . . . . . . . . . . . . . . . . 6 What you need to run this software. . . . . . . . . . . 7 Chapter 1: What An Ounce Of Prevention Does . . . . . . . . 8 Chapter 2: Using the Install Program. . . . . . . . . . . .11 Chapter 3: Installing The Program By Hand . . . . . . . . .13 Chapter 4: OzUtil: The Oz Utility Program. . . . . . . . .16 Chapter 5: When Your Disk Fills Up. . . . . . . . . . . . .19 Chapter 6: Handling DOS Critical Errors . . . . . . . . . .24 Appendix A: OzRes Error Messages. . . . . . . . . . . . . .26 Appendix B: Technical Notes . . . . . . . . . . . . . . . .28 Appendix C: Support . . . . . . . . . . . . . . . . . . . .30 Appendix D: Shareware . . . . . . . . . . . . . . . . . . .31 Introduction ============ Why You Need An Ounce Of Prevention: A True Story === === ==== == ===== == =========== = ==== ===== Early in 1987, one of the designers of An Ounce Of Prevention suffered repeated hard disk disasters. In one case, he accidentally erased several dozen very important documents and was unable to recover most of them because the products available at the time could not retrieve erased files consistently. This person learned a lot about hard disks during that period: Hard disks are very reliable until the slightest thing goes wrong. Popular utility programs such as The Norton Utilities, PC Tools, and Mace, emphasize curing file problems after they happen, rather than preventing their occurring in the first place. And afterwards is often too late. And even though those other programs can sometimes resurrect deleted files, they can never restore overwritten files, such as spreadsheets. Operating under the adage that "an ounce of prevention is worth a pound of cure," we thought that there must be a way to insure programs and data against loss before disasters occur. Thus was born An Ounce Of Prevention, the program that prevents data loss. Since it would be unwieldy to use the product's full name at every mention, we'll generally refer to it using the standard abbreviation for an ounce, Oz. What An Ounce Of Prevention Does For You ---- -- ----- -- ---------- ---- --- --- Oz offers several levels of data protection: File Security - Oz automatically preserves deleted files so that they may be instantly restored if needed. Up to eight generations of each deleted file can be preserved, all under the same name. Reformat Trapping - Oz prevents accidental or malicious attempts to reformat a hard disk. Write Protection - Oz allows you to write-protect a disk if you suspect the presence of a virus, or other rogue program, that might try to damage your system. Full-Disk Protection - Oz traps "full disk" conditions and offers you a helpful set of options to free some space for your work. Critical Error Handling - Oz recognizes a number of critical disk errors, tells you what is wrong, and offers a range of options for dealing with them. Note to Novice Users ---- -- ------ ----- It is not necessary to be a programmer or even a "power user" to install and use Oz. It is advisable, however, for you to be familiar with certain basic MS-DOS principles and techniques such as: Copying and renaming files. Creating directories and sub-directories. Changing drives and directories. Creating and changing batch files. File List ---- ---- An Ounce Of Prevention includes the following disk files: OZRES.EXE An 18KB memory-resident program that preserves files, traps disk formats, and pops up when you run out of diskspace. OZUTIL.EXE The Oz utility program which restores files preserved by OzRes and performs various other related tasks. INSTALL.EXE The Oz installer. Copies the Oz system to a directory of your choice, optionally edits your AUTOEXEC.BAT, and configures Oz to protect your system according to your specifications. README.EXE A simple browser program for reading documentation files. MANUAL The Oz User Guide that you are now reading. STARTER A one-page quick-start guide for users who hate to read manuals. LICENSE The Software License Agreement for unregistered users. Please read this before using the software. REGISTER Instructions for registering your copy of Oz. ORDER.FRM An order form for registering your copy of Oz. VENDOR.DOC Special information for diskette vendors, BBS sysops, and other businesses that distribute shareware. What An Ounce Of Prevention Needs ---- -- ----- -- ---------- ----- Compatible Computers - Oz has been tested on a large number of systems including PCs, ATs, and PS/2s. It should be compatible with any IBM PC or compatible computer running DOS 2.1 or higher. It has not, however, been tested with DOS version 5. Compatible Graphics Adapters - OzRes, the Oz resident program, may not properly restore certain high-resolution graphics screens after it "pops-up." To do so would require substantially more RAM than most users would care to give up. Hard Disks - Although we have not found any, it is possible that Oz may have some difficulties with a few hard disks that have non-standard drivers. If you have doubts about your system, we recommend that you back up your drive before installing Oz, just to be sure. Memory Requirements - OzRes, the memory-resident portion of Oz, permanently occupies about 18K of RAM. With the aid of memory-management products such as QEMM 386, it can be loaded into extended memory. TSR Compatibility - OzRes should be compatible with other terminate-and-stay- resident programs, such as SideKick or Gopher, because, unlike most, it does not have to watch the keyboard for a signal to "pop-up." The only TSR program known to be incompatible with Oz is Lotus Express. Should you experience a compatibility problem, such as a system freeze, you can probably prevent a recurrence by changing the order in which your TSRs are loaded. If possible, OzRes should be loaded first, before any other TSRs. Chapter 1 What An Ounce Of Prevention Does ==== == ===== == ========== ==== Oz protects your data by preserving deleted and overwritten files so that you can recover them. Provided that you have some unused disk space, this function is far more powerful than that provided by "unerase" programs such as those found in Norton Utilities or PC Tools. Oz also performs other valuable tasks related to disk and file safety, including: Protection against attempts to format your hard disk(s). Optional protection against all attempts to write to a hard disk. Trapping critical DOS errors, providing additional information about them, and more power to recover from them. Preserving Deleted Files ---------- ------- ----- Oz's primary purpose is to preserve deleted files. When Oz is installed in your PC, something special happens whenever an attempt is made to delete a file: Oz hides it. You do not see these "Oz-deleted" files on directory listings, and you can create new files with the same names. If fact, the only obvious evidence you can see that such files still exist is that they continue to occupy disk space. But they are still there for you, and Oz can instantly restore them, at your command. When an application program updates a data file, it may do so in one of two ways: (1). The program can delete the existing version of the data file and then create a new one with the same name. Many such applications also create a backup copy, often on a file with the extension .BAK. (2). The program may overwrite the old file with the updated data. Many spreadsheet programs, including Lotus 1-2-3, work in this fashion. Oz preserves files that you delete by means of DOS' DEL or ERASE command, and also files that are deleted internally by programs. Oz does not, however, preserve copies of files that are overwritten when changes are made to them. We wish that Oz could protect those overwritten files for you too but there is, unfortunately, no way for it to accomoplish that in a reliable and efficient manner. Multiple Generations -------- ----------- Oz preserves not only the last version of a deleted file, but up to eight generations. Each time a file is overwritten, a new preserved file is created, but previous generations remain available, just in case. Imagine a stack of paper files: Each time you add or change something, a new copy of the file is added to the top of the stack while the oldest generation drops off the bottom. It is, in practice, unlikely that you will ever need to retrieve a file that is eight generations old, so Oz allows you to limit the number of generations that it will protect for you. The default is two generations. Making Use of "Unused" Disk Space ------ --- -- -------- ---- ----- Oz maximizes the value of that portion of your disk space not occupied by active files. Without Oz, unused disk space fills with bits and pieces of deleted files that can never be used again. Some of the data in that unused area could be extremely valuable especially in an emergency but, without Oz, it is completely disorganized and is gradually overwritten and permanently lost. Without Oz, if you need to unerase a lost file you have to search for each piece of it. You may find pieces missing as space gets overwritten; and you may have a lot of trouble distinguishing pieces left over from various different versions of the file. Oz, then, performs a unique service. It allows you to take full advantage of every single megabyte of disk that you buy, not just the portion that contains your active files. (Nevertheless, there is no truth to the rumor that Oz is the result of a conspiracy by disk manufacturers to get you to buy more and larger drives.) What Happens When Your Disk Fills Up? ---- ------- ---- ---- ---- ----- --- Whenever DOS runs out of space on the disk to store new files, Oz produces a box on your screen giving you various options for handling the situation, including that of discarding older generations of Oz-deleted files. z Other Protection Facilities Provided by Oz ----- ---------- ---------- -------- -- -- Write Protection - Oz can protect your existing programs and data by "write- protecting" your disk. This temporarily prevents software from changing anything, and allows you to test software without risking the introduction of a dangerous "Trojan Horse" program that might destroy your files. Write-protection can also protect sensitive files that may be damaged by inexperienced users. Write-protection is easily set and removed by using the Oz utility program described in Chapter 4. Note: Oz's write protection is the strongest that can be enforced by software, but it is not perfect. Only special hardware devices can provide absolute protection against destructive write operations to a disk. Preventing Hard Disk Formats - When the Oz resident program is active, it constantly watches your system for any attempt to format the Oz-protected disk. When Oz intercepts any action that might signify a format operation, it immediately write-protects the disk. A virus or a software bug will then find it very difficult to cause any damage. This procedure is somewhat draconian -- your work will immediately stop until you tell the Oz utility program to cancel write-protection (see Chapter 4). But your disk and the data on it will be safe. Note: If you deliberately intend to reformat a hard disk, you must unload OzRes. An option in the Oz utility program, can do this for you. Trapping Critical Disk Errors - When DOS detects a potentially fatal error, it normally reacts by interrupting your work with a cryptic message that may cause your system to crash, for example: Not ready error reading drive A: Abort, Retry or Ignore? Oz suppresses these messages and instead displays a dialogue box that explains the problem and what can be done about it. And Oz does this for errors on all disk volumes, not just Oz-protected drives. Remember to Backup! -------- -- ------- While Oz can prevent many potentially disastrous losses of data and programs, it is not a substitute for regular backups -- there are simply too many possible catastrophes that are beyond the capabilities of software alone. These include: Bad disk sectors Hard disk errors (bad media, controller cars, etc.) Power surges or spikes Malicious destruction of files Fire, theft, and acts of nature Believe us when we tell you: Backup your important files and store the backups in a secure place. Chapter 2 Using the Install Program ===== === ======= ======= With most programs, installation is a secondary task. One copies the files, and that's it. With Oz, however, installation is of prime importance because most of its functions occur automatically in the background while you do your regular work. Unless you take some time and care to install Oz properly, it will not give you the best protection possible. Installing Oz is Easy - Once Oz is installed, you can forget about it. Until, that is, you accidentally delete an essential file. Then you will be glad you took the time and trouble. Guided Tour - Once you have installed Oz, you can get a guided tour of its protection mechanisms by selecting the Demo option from the menu of the Oz utility program. The Oz Installer --- -- --------- INSTALL.EXE is an interactive, self-documenting program that asks a set of questions to determine how you want Oz installed. As you answer these questions, the Installer does the following: Copies the Oz files to an existing directory, or creates a new one. Adds, if you desire, a customized command line to your AUTOEXEC.BAT file (or AUTOUSER.BAT for users IBM's PC LAN Program) that automatically loads the resident OzRes program each time you start DOS. Installing From Diskette ---------- ---- -------- If you have Oz supplied on a diskette, then insert the Oz diskette into your A: drive and, at the DOS prompt, enter: a:install You may, alternatively, install Oz from your B: drive. Just type: b:install Installing From a Hard Disk ---------- ---- - ---- ---- If you have downloaded Oz from a BBS or have otherwise obtained the distribution package on a hard drive then, while in the directory where the Oz files are, type: install Using The Installer ----- --- --------- When you start the Installer you see an introductory screen welcoming you to An Ounce Of Prevention. The animated logo, in case you don't recognize it, represents the silhouette of a spinning disk drive with its heads moving randomly from track to track. Press [Space] to clear the Oz logo from the screen. The logo disappears and the Installer asks you a set of detailed questions about what you want Oz to do for you: Where to place the Oz files The number of generations of files to protect The drives or volumes to protect Whether or not you wish to protect archived files Certain file types that you do not wish to protect As you answer these questions, the Installer displays your choices at the top of the screen. Press [Space] to pass through the help screens, or [Esc] at any time within the program to completely cancel the installation. If you change your mind at any point about the selections you have made, don't worry; the last question asked by the Installer allows you to cancel everything and start again. Note: The Installer does not copy INSTALL.EXE to the Oz directory. There is normally no need to have it there so why waste the space. Changing the Installation -------- --- ------------ If you make a mistake or wish to reconfigure your Oz installation, you can run the Oz Installer again. But it's usually easier to delete or modeify an Oz command line manually with an ASCII editor or word processor following the guidelines in the next chapter. Loading Order ------- ----- The Installer leaves you to choose where in the AUTOEXEC.BAT file it should place the command to load the memory-resident part of Oz. If you later discover that other memory-resident software is sensitive to loading order, you may wish to use an editor to move the command line to another position in the file. Chapter 3 Installing Oz By Hand (For Experienced DOS Users) ==== =========== === ====== The previous chapter showed you how to install Oz using the Install program. While the Installer may be useful to first time users of Oz, experienced users may prefer to install Oz "by hand," that is with the use of the DOS copy command and a text editor. This method is also the best way to modify an existing Oz installation. Copying Oz ------- -- Oz comprises only four files, all which can be copied into a directory of your choice, typically called "\OZ". To copy these files from a distribution disk in A: drive, enter: C>md \oz C>cd \oz C>copy a:*.* Note: Oz does not require that its files reside in a specific directory. It is however a good idea to keep it in a directory with a self-explanatory name, such as "\OZ". Pathing to Oz - You should include the Oz directory in your DOS PATH statement. This will allow you to run Oz from any directory. Or, even better, move OZU.EXE into a directory that already appears in your path. The OzRes Command Line --- ----- ------- ---- Oz is installed into your system by the use of a special DOS command line that loads OzRes - the memory-resident portion of Oz that stands guard over your data - and tells it what you want it to do. This command line is normally placed in your AUTOEXEC.BAT file so that OzRes is automatically loaded each time you start DOS. You may also start OzRes by entering a command line at the DOS prompt: ozres cd: /1a *.$* TEMP.* *.QQQ *.bak *.prn *.chk After the filename "ozres" in the above example are a number of "arguments." These arguments are explained in the remainder of this chapter. The Oz-Protected Disks --- ------------ ----- The first argument identifies the disks that Oz is to protect. You may list any number of DOS drive letters. In our example, Oz is told to protect drives C: and D:. ozres c: <- OzRes must be provided with at least one disk name or it will refuse to run! The colon following the drive letters can be omitted but it's a good idea to include it as it serves as a reminder of the argument's significance. OzRes will protect hard-drive volumes only. Floppy, RAM and network drives are unacceptable. Program Options ------- ------- Program Options are two optional characters on the OzRes command line that may appear in an argument that begins with a slash: ozres c: /1a The Program Options may appear after the slash in any order. The above example takes advantage of both options. Generations - Oz will protect up to eight generations of files, discarding the oldest file each time the maximum number is reached. A numeral after the slash character on the command line tells OzRes the number of generations that you wish to keep. The 1 below tells OzRes that you want it to protect a single generation of deleted files: OZRES c: /1 <- OzRes will protect just one generation. A number between one and three is recommended to make the best use of disk space. If you do not provide a value, OzRes assumes a default value of two generations. Archive - It is wasteful to ask Oz to preserve files that have already been backed-up - you already have safe copies of these. The Archive Program Option tells OzRes to ignore any file that has been backed-up; DOS then erases it in the conventional way: ozres c: /1a <- The numeral "1" is optional OzRes uses a standard DOS technique to tell whether a file has been backed up: the "archive attribute" maintained for each file. DOS automatically turns on a file's archive attribute whenever any write is performed to it. If you do not specify the /a option, OzRes pays no attention to the archive attribute. Note: Not all backup programs turn off the archive attribute. If yours does not, you should not use the Archive program option. To find out, consult the backup program's manual or use the MS-DOS utility "ATTRIB": C>attrib filename <- Checks a file called "filename" Exclusions ---------- All subsequent arguments on the OzRes command line identify files that you wish to exclude from Oz's protection. By excluding files that you would never want to restore, Oz can make the best use of disk space for preserving those files that you might need to undelete. These exclusions are written on the command line as wildcard statements, as in the example found on the previous page: ozres cd: /4a *.$* TEMP.* *.QQQ *.bak *.prn *.chk Temporary Application Files - DOS often creates temporary files having an extension of .$$$. There is nothing to be gained by preserving them. Many programs create temporary files as they edit, sort, or print. MS Word, for example, creates files with extension .TMP. WordStar creates temporary files with extensions like .$A$ and .$B$. To learn the filename conventions used by your application software, check your manual for the specific naming convention, or enter a "DOS Window" while the program is running and run a DIR listing. Temporary Personal Files - You may customarily create temporary files of your own to hold portions of documents or test data. If you do this, give your temporary files a standard style of name - TEMP.xxx or xxxxx.QQQ for example - so that OzRes can be instructed to ignore them. Backup Files - Other programs, such as WordStar, do not erase previous versions of files, but rename them - LETTER.DOC becomes LETTER.BAK, for example - as soon as a new version is saved to disk. You may or may not wish to exclude such files. Note that this process preserves only one prior version of each file. If you want more than one generation to be preserved, do not include .BAK files in the exclusion list. Re-creatable Files - Many files can easily be recreated and would only waste disk space if preserved by Oz. Compilers, for example, produce object files with the extension .OBJ. Very Large Files - Exclude databases and other big files when you have insufficient diskspace to accommodate deleted versions of them. Print Files - If you use any applications that write printable output to files rather than directly to a printer then be sure to exclude those files. Lotus 1-2-3, for example, creates print files with the extension .PRN. Tip: Most files that you would want to exclude from Oz's protection can be identified by a telltale extension. It is quite okay, however, to identify exclusions by other patterns or by exact filenames. Chapter 4 OzUtil: The Oz Utility Program ======= === == ======= ======= Overview -------- OzUtil is a menu-driven utility program that allows you to perform a number of useful "housekeeping" chores, such as restoring Oz-deleted files. To start OzUtil, at the DOS prompt enter: ozutil You then see: 旼컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴커 께께께께께께께께께께께께께께 An Ounce Of Prevention 께께께께께께께께께께께께께께 읓컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴쬔 � OzRes is loaded and protecting disk C: � 憫컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴좆 � � � � � � � � � � � � Restore Oz-deleted files � � � Demonstrate An Ounce Of Prevention � � � Information about An Ounce Of Prevention � � � Purge Oz-deleted files to free disk space � � � Toggle write-protection on the Oz-protected disk � � � Unload Oz-resident program from memory � � � Quit � � � � � � � � � � � � � 읕컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴켸 The line below the program name is the status line, which tells you whether or not OzRes, the Oz-resident program, is in memory. If OzRes is active, the status line identifies the volumes it is protecting. The main panel of the display contains a menu of the program's functions. Use the cursor keys to navigate through the options and select an option by pressing [Enter]. Alternatively you may simply press the initial letter of a menu entry. You can leave OzUtil by selecting the "Quit" option - or by pressing [Esc]. Restore Oz-deleted Files ------- ---------- ----- This feature allows you to retrieve up to eight previous generations of files deleted on a xprotected disk, depending on the number of generations that you instruct OzRes to preserve. To restore Oz-deleted files, select the "Restore Oz-deleted files" option from the main OzUtil menu. OzUtil displays an alphabetized list of all Oz-protected files in the current directory, and the number of versions available of each. Number of deleted Filename versions AUTOEXEC.BAT 2 BWPRINT.C 1 BWLOCK.C 3 PIX 1 X.BAT 1 Move the menu bar to select the file to be restored. (You can restore any number of preserved files but must do so one at a time.) If there is more than one version of the file, OzUtil displays a menu of the Oz- protected versions in numeric order, oldest first: Version number Directory entry 1 AUTOEXEC.BAT 128 90/02/25 06:29 PM 0 AUTOEXEC.BAT 128 90/02/25 06:29 PM This menu includes the version number, file name, size, date, and time of each deleted file of the same name, helping you to pick the exact file that you want to restore. As on any normal directory listing, the date and time note when the file was last changed, not when it was deleted. Move the menu bar to choose the desired file or press [Esc]. OzUtil asks you to confirm your choice: Target file for undeletion is: BWNFSD.C 28,175 89/09/26 12:47 AM Please confirm (Y or N): If an undeleted version of the file already exists in the directory, OzUtil allows you to either replace the existing file or type in a new name for the restored file. Should you try to give the file a name that is already used in the current directory, OzUtil asks you to try again. Other OzUtil Features ----- ------ -------- Demonstrate Oz - This is a simulation that demonstrates the protection functions of OzRes, the resident portion of Oz. It operates only when OzRes is loaded. Note: This is not a disabled demo. The functions of OzRes will actually work within it. Information About Oz - This function displays the Oz logo and identifies those responsible for the program. Purging Oz-Protected Files - This option permanently erases a specified level of Oz-protected files, allowing you to reuse their disk space. When you choose the Purge option, OzUtil will prompt you for the number of generations you wish to keep: How many generations of Oz-protected files should be preserved by this purging? Enter 0 - 7 (or to quit): After you choose the number of generations to preserve, OzUtil searches all directories on the Oz-protected disk and deletes all Oz-protected files with version numbers greater than your choice. Note that there is very rarely any need to use the purge option. In fact purging files wastes disk space. Generally you are better off letting your disk fill up and leaving it to OzRes to handle disk-full conditions. One time that you may benefit by purging some older Oz-deleted files is prior to defragmenting a disk. Toggle Write-Protection - As described in Chapter 1, OzRes automatically protects your selected disks against format attempts by "write-protecting" them. When this happens, files cannot be created, modified, or deleted. The Toggle Write-Protection option allows you to turn write-protection off after an attempt to reformat the disk - or turn it on in case you wish to test unknown software that may contain a Virus or Trojan Horse. When disks are write-protected, OzUtil displays in the status line near the top of the screen: OzRes has write-protected your hard drives A critical error message will appear if you attempt to write to a write- protected disk (see Chapter 6). Unload OzRes from Memory - This option removes OzRes, the terminate and stay resident (TSR) portion of Oz, from your computer's memory. There are three common reasons for removing OzRes from memory: To reclaim the memory used by OzRes, about 18K. To reload OzRes with a different command line. To deliberately reformat your hard disk. The effect of unloading OzRes is immediate and you are returned to a simplified menu. Quit - This option, or [Esc], terminates OzUtil. Chapter 5 When Your Disk Fills Up ==== ==== ==== ===== == Oz-deleted files can consume a lot of disk space, and may eventually fill the disk with older generations of files that you no longer need. When the free space on your disk is exhausted, OzRes allows you to reclaim disk space even in the middle of an application - without losing your work or crashing the system - by popping up with a menu of options. Before Reading this Chapter: Bringing Up OzRes ------ ------- ---- -------- -------- -- ----- A common procedure when reading a software manual is to simultaneously operate the program's features. With OzRes, this requires some preparation. Most TSR (terminate and stay resident) programs "pop up" in response to a "hotkey" signal from the keyboard, such as a combination of [Alt] and [Enter]. OzRes does not work this way - it normally appears only in response to an error condition in the system. If you wish OzRes to appear in order to accompany the test of this chapter, then start OzUtil and run the demo. If Your Disk is Full... -- ---- ---- -- ------- When OzRes detects that there is not enough space on an Oz-protected disk to complete a disk write, it displays a dialog box on your screen: �� An Ounce Of Prevention 袴袴袴袴袴袴袴袴袴� � � � Your disk C: is full. � � � � You may: Continue Purge Move Delete � � Return to application � 훤袴袴袴袴袴袴袴袴袴袴袴袴袴袴袴袴袴袴袴袴袴� This dialog box offers four choices along with short explanations of their functions. To use any of the options: Press the capitalized letter of the option, or Move the cursor bar to the desired option and press [Enter] Continue -------- Selecting the Continue option causes OzRes to take no action whatsoever, but returns the error condition to the application program. You must then rely on the application itself to handle the disk-full error. Some applications do not do a good job of this. A few, in fact, fall flat on their faces. Purge ----- This option is similar to the Purge function of OzUtil. It searches the disk for older generations of Oz-deleted files in order to free disk space. When you select the Purge option, OzRes tells you how many generations of Oz- deleted files are being kept, and prompts you for the number of generations that you wish to keep: �� An Ounce Of Prevention 袴袴袴袴袴袴袴袴袴� � � � Oz is maintaining 7 generations of � � deleted files. How many generations � � do you want to keep (0 - 6)? � 훤袴袴袴袴袴袴袴袴袴袴袴袴袴袴袴袴袴袴袴袴袴� Press the desired number and [Enter]. OzRes searches all directories on the protected disk and permanently deletes any Oz-protected files of generations earlier than the specified number. OzRes keeps you informed of its progress by providing a line that displays: Scanning directory: (path name) OzRes quickly displays the names of files that it purges from disk. When it is finished, Oz either states the number of bytes reclaimed... Diskspace freed: x bytes Or announces... No space reclaimed Press any key to continue. DOS will again attempt to write to the disk. If there is still insufficient space, the "disk full" dialog box reappears. Moving Files ------ ----- The Move option frees disk space by "moving" selected files to another disk. OzRes copies the files that you select to that disk, then deletes them from the Oz-protected disk. Note: Unlike the commonly used "move" function of DOS shell programs, this option does not merely switch files from one directory to another but copies from one physical drive to another, then deletes the original. Choose the Move option on the dialog box. OzRes displays another box: 旼컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴커 � � � Ready to move files to another disk. � � � � Target disk [A-E]: � � � � Use: to return to menu. to change directory. � � , , and to scroll the directory listing. � � � 읕컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴켸 Press a letter from "A" to "E" to choose the target disk to which the files are to be moved, for example "A". The message on "Oz" line in the dialog box will read: Ready to move files to A: You will be asked to provide the name of a file to be moved at the line "Enter filename:' 旼컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴커 � � � Ready to move files to A: � � � � Enter filename: � � � � Use: to return to menu. to change directory. � � , , and to scroll the directory listing. � � � � Current directory: C:\STUFF � � COLDBOOT.COM WARMBOOT.COM CP.EXE LS.EXE RM.EXE � � STRINGS.EXE SIZE.EXE MV.EXE BEEP.COM CLEAN.EXE � � DUP.EXE CLOD.EXE CMOSGET.COM CMOSPUT.COM COMMODE.EXE � � DF.EXE DVICEMAP.COM DVICEMAP.DOC FC.EXE MAPMEM.COM � � MEMTEST.EXE PKARC.COM PKXARC.COM SCRSAVE.EXE SNAP.COM � � TOUCH.EXE CORTST26.DOC CORTST27.EXE WSN.EXE WFIX.EXE � 읕컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴켸 At the bottom of the box is a listing of files in the current directory. The following keys help you navigate through this display: [Esc] return to the OzRes menu without effect [F1] change current directory [PgDn] scroll down the directory listing [PgUp] scroll up the directory listing [Home] beginning of the directory listing [End] the end of the directory listing When you are ready to move a file, enter the filename at the prompt. If OzRes is able to copy the file to the new disk, it displays: Copying: filename After it is finished copying, OzRes checks to see that the file was moved correctly and displays: Verifying: filename After the copy is verified, OzRes erases the file on the Oz-protected disk, updates the directory list in the dialog box, and displays the total number of bytes available on the protected disk: Freespace on disk is N bytes Note: Files are moved to a directory called "\OZ". This directory is created on the target disk if it does not already exist. Changing to a New Directory - if you wish to display a new directory on the OzRes Move screen: Press [F1] The dialog box will prompt you for a new directory path. Enter the path name, always preceded by a "\". The files in the new directory are displayed at the bottom of the screen. If, however, you enter an incorrect path name, OzRes "beeps" and displays the message: Path not found. Press any key to continue. You are then prompted to enter another path name. Important Note: NEVER move or delete a file that is in use - such as that containing a document you are currently working on - even if it appears in the file list! This may prove disastrous when your application needs to write to it again. Delete ------ If you choose to delete files to free disk space, Oz displays a dialog box listing the files on the current directory: 旼컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴커 � � � Ready to delete files. (These files will be truly deleted.) � � � � Enter filename: � � � � Use: to return to menu. to change directory. � � , , and to scroll the directory listing. � � � � Current directory: C:\STUFF � � COLDBOOT.COM WARMBOOT.COM CP.EXE LS.EXE RM.EXE � � STRINGS.EXE SIZE.EXE MV.EXE BEEP.COM CLEAN.EXE � � DUP.EXE CLOD.EXE CMOSGET.COM CMOSPUT.COM COMMODE.EXE � � DF.EXE DVICEMAP.COM DVICEMAP.DOC FC.EXE MAPMEM.COM � � MEMTEST.EXE PKARC.COM PKXARC.COM SCRSAVE.EXE SNAP.COM � � TOUCH.EXE CORTST26.DOC CORTST27.EXE WSN.EXE WFIX.EXE � 읕컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴켸 The following keys command keys work exactly as they do in the Move command: [Esc] return to the OzRes menu without effect [F1] change current directory [PgDn] scroll down the directory listing [PgUp] scroll up the directory listing [Home] beginning of the directory listing [End] the end of the directory listing When you are ready to delete a file: Enter the filename at the prompt. OzUtil displays the message: Deleting: filename Note: Again, make sure you do not delete something you need, especially a file that the current program is using. If Your Disk is Still Full... -- ---- ---- -- ----- ------- If you do not reclaim any space by Moving or Deleting files, the disk-full condition persists and the dialog box returns, displaying: Your disk X: is still full. If you Move or Delete files, but do not reclaim enough space, DOS returns another disk full error and the first OzRes dialog box returns. Try Moving or Deleting more files. If enough space is freed, the OzRes dialog box does not return and you can proceed with your work. Chapter 6 Handling DOS Critical Errors ======== === ======== ====== What are Critical Errors? ---- --- -------- ------- Critical Errors, usually failures to read or write a disk, prevent DOS from continuing a disk operation. DOS tries to overcome the error by retrying the operation several times. If it is still unsuccessful, DOS may interrupt your work with a cryptic message, for example: Not ready error reading drive A: Abort, Retry or Ignore? Unless your current application intercepts these errors and handles them internally, and most do not, your work is interrupted and the screen display may be corrupted. Oz suppresses these messages and instead produces a dialog box on the screen that offers a detailed explanation of what is failing and what you can do about it. �袴袴袴袴袴� An Ounce Of Prevention 袴袴袴袴袴袴袴敲 � � � An error has been detected on disk A: � � Cause: Attempt to write on write-protected disk � � Operation: Write to a directory � � Head: 1 Cylinder: 0 Sector: 2 � � � � You may: Ignore Retry Abort Fail � � Ignore the error and continue � 훤袴袴袴袴袴袴袴袴袴袴袴袴袴袴袴袴袴袴袴袴袴袴袴袴暠 This dialog box contains more information than DOS provides and, unlike other Oz features, operates for all drives. The Critical Error dialogue box contains the following information displayed on different lines: Cause ----- The Cause describes the critical error detected by DOS. In the previous example, OzRes reported the following: Cause: Attempt to write on write-protected disk Operation --------- This is the DOS "operation" - disk read or write - when the error occurred, for example: Operation: Write to a directory The Operation tells you: Which operation failed, a read or a write. Where the operation failed - DOS area, File Allocation Table, a directory, or a file. This information can help you determine which file or directory is having trouble. Head, Cylinder and Sector ----- -------- --- ------ The fields on this line can tell advanced users the physical location of the problem on the disk: Head: 1 Cylinder: 0 Sector: 2 This information can be used to identify bad spots on the disk that can then be marked as unusable. Choices ------- At the bottom of the dialog box is a menu of four choices: Ignore - This option tells DOS to ignore the error, allowing the application to continue operating. Choose this option only when you know the cause of the error, and are sure that it is harmless. You might choose "Ignore" if part of a document that you are trying to read into a word processor resides on a bad sector. DOS will continue reading the disk, allowing you to later excise the bad portion of the document. Retry - This option retries the disk operation that failed. While DOS itself retries disk operations several times before reporting an error, you may be able to correct some errors by yourself. For example, the "Drive Not Ready" error message is intended to be a "pause" that allows you to insert a floppy disk into a drive or close the drive door. A "Read Fault" error allows you to give a fickle floppy disk just one more chance. Abort - This option kills the current program, a safe bet if you can stand to lose the work done since the last save. Fail - This is option returns the error condition to the program. Fail is a good choice only if the application gracefully handles the error condition itself. If it won't, use Abort. Appendix A OzRes Error Messages ===== ===== ======== If OzRes fails on start-up due to a DOS, system, or command-line error, it terminates with the message: OzRes initialization error: immediately followed by an explanation the nature of the problem. The following are the known problems that might cause a OzRes initialization failure, and possible solutions to each of them: Drive is Incompatible or Faulty - OzRes has been asked to protect a non-existing or unsuitable disk, such as a network drive or a drive that has a nonstandard driver. Drive does not exist - You have specified a letter that does not identify a disk volume. Drive has an unacceptable sector size - All standard DOS drives are formatted with 512-byte sectors. OzRes refuses to handle a drive with a different sector size. Drive is an Assigned or Network Drive - OzRes does not protect drives that are identified indirectly via the DOS ASSIGN command, nor network drives. Drive is not a Hard Drive - OzRes does not protect floppy drives or RAM disks. Drive is not a Valid Partition - You have a hard drive that is partitioned in some non-standard manner that OzRes cannot understand. DOS Incompatibility - You are running a nonstandard version of DOS that OzRes does not recognize, such as the private-label "Falcon-DOS". You must switch to a standard variety of DOS, such as MS-DOS, PC-DOS, or possibly, DR-DOS. Duplicate Disk Specification - You have entered a command line containing a repeated disk letter, such as: ozres cdc: Invalid Argument - You have attempted to load OzRes with an invalid command-line argument. Please check Chapter 3 for the proper syntax of a OzRes command line. Invalid Command Line Option - You have attempted to load OzRes with an invalid Program Option following a slash. The only valid Program Options are "A", for the archive feature, and "n", where "n" is the number of generations to be preserved. Invalid Disk Specification - OzRes is unable to understand the drive name that you have specified. You may, for example, have specified an invalid drive name, such as "3:". No Disk Specified on Command Line - OzRes will not continue unless you provide a drive for it to protect, usually "C:" drive. Program is Already Loaded - You may have only one active copy of OzRes. If you load another, OzRes will detect the presence of the first copy and refuse to continue. If it is important to protect a disk other than the currently protected one, you should first unload OzRes with OzUtil. Runs Only With DOS versions 2, 3, or 4 - OzRes will not run under either DOS 1 or the OS/2 compatibility box. Appendix B Technical Notes --------- ----- How Oz Preserves Deleted Files --- -- --------- ------- ----- When a request is made to delete a file, OzRes intercepts that request before DOS can process it. OzRes then checks the following criteria to decide if it should preserve the file: 1. Is the file on the volume that Oz is protecting? 2. Has the file been backed-up in its current form? 3. Is the file excluded from preservation by virtue of having a name that matches one of the exclusion patterns given to Oz at startup? 4. Is the filename free of "weird" characters? (See the section on Odd Filenames below.) If the answer to any of these questions is no, then OzRes passes on the request to DOS which performs the deletion in its normal way. If the answer to every question is yes, then Oz handles the deletion by taking the following actions: 1. Oz flags the file as hidden. 2. Oz searches for older generations of the same file. If it finds any, it reassigns generation numbers to make room for the new generation. 3. If a file is found whose generation number is the the highest that OzRes has been told to preserve, it is discarded. 4. Oz encodes the file's name to preserve the generation number. Oz does not move files to another directory, but renders them invisible while leaving them in the same directory. Using File Shell Programs on Oz-Protected Volumes ----- ---- ----- -------- -- ------------ ------- Some utilities such as XTREE and the Norton Utilities' FA can "see" Oz-deleted files. Should you use such a utility you can always spot a Oz-deleted file because its name starts with the character Pi (�). DOS will not erase Oz- deleted files because they have the "hidden" attribute set. You may find that a file utility such as XTREE can copy a Oz-deleted file, but the copy will also be hidden unless you change its attributes. It is always wise to leave Oz-protected files alone! Odd Filenames --- --------- Oz preserves only those files that have names composed of keyboard characters (including those on foreign keyboards). DOS allows you to use strange characters, such as graphics characters, in filenames, but Oz will not preserve files with such names. As mentioned above, Oz uses one special character when naming its files. That character is the Greek letter Pi (�) which has the value 227 (E3 hex). Preserved files are maintained in their native directories as "hidden" files whose names start with Pi. Oz may not work reliably if any other software is creating files with names starting with this character. Upon preserving a file, Oz clears the file's archive attribute. When Oz restores a preserved file, it sets the archive attribute. This means that a Oz- protected file will not be considered a candidate for backup by those backup programs that key on the archive attribute. If your backup program keys by date and time, or backs up all file no matter what, then it will dutifully backup Oz- protected files. Files that Oz Won't Delete ----- ---- -- ----- ------ Oz does not try to delete files that DOS would not delete. These include files with the read-only attribute set. In such a case, Oz returns the same error code to your program that DOS would. Appendix C Support ------- This product is backed by a business that has been in full-time operation since 1983. It is our wish and intention to provide the best user support that we can. We are, nevertheless, a small operation and are unable to offer call-in telephone support. We do offer support by mail, fax and electronic mail. By Mail: Please direct letters to our regular address: Pete Maclean Software P. O. Box 591359 San Francisco, CA 94159-1359 By Fax: Please send facsimiles to +1 415-751-4635. By Email: Please direct electronic mail to id [75776,660] on CompuServe. Note that email will be forwarded to CompuServe by MCI Mail and certain other public mail systems. From MCI Mail use the following address: To: Pete Maclean Software EMS: COMPUSERVE MBX: 75776.660 Appendix D Shareware --------- Shareware is a distribution method for commercial software that gives you a chance to try a product before you buy it. If you try a Shareware program and continue using it, you are expected to register. Details differ -- some Shareware publishers request registration while others require it; some specify a maximum trial period. With registration, you get anything from the simple right to continue using the software to an updated program with printed manual. Copyright laws apply to Shareware, as to any other commercial software, and the copyright holder retains all rights, with a few specific exceptions as stated below. Shareware authors are accomplished programmers and the programs are of comparable quality to retail products. (In both cases, there are good programs and bad ones!) The main difference is in the method of distribution. The Shareware publisher specifically grants the right to copy and distribute the software, either to all and sundry or to a specific group. For example, some publishers require written permission before a commercial disk vendor may copy their Shareware. Shareware, then, is a distribution method not a type of software. You should find software that suits your needs and pocketbook, whether it's retail or Shareware. The Shareware system makes fitting your needs easier, because you can try before you buy. And because the overhead is low, prices are low also. Shareware has the ultimate money-back guarantee -- if you don't use the product, you don't pay for it. This program is produced by a member of the Association of Shareware Professionals (ASP). ASP wants to make sure that the shareware principle works for you. If you are unable to resolve a shareware-related problem with an ASP member by contacting the member directly, ASP may be able to help. The ASP Ombudsman can help you resolve a dispute or problem with an ASP member, but does not provide technical support for members' products. Please write to the ASP Ombudsman at 545 Grover Road, Muskegon, MI 49442 or send a Compuserve message via easyplex to ASP Ombudsman 70007,3536. 旼컴컴컴컴� 旼컴컴좔컴� � (R) 컴� 쿽 냐컴컴컴컴컴컴컴컴� � 旼컴컴죗컴� � Association of � � 냐� Shareware 읕컴� o � Professionals 컴컴컴� � 냐컴컴컴컴컴컴컴컴컴� 읕컴켕컴컴� MEMBER