Command Line Syntax
===================

When the patch file is placed in the same directory as the files to be updated
and its name is PATCH.RTP, you will only need to type PATCH at the command
line. If PATCH is given any input, the input must be provided on the command
line in the following format:

patch [Options] [<UpdateDirectory>] [<PatchFile>]

The '[ ]' characters signify entries that do not necessarily have to be
provided on a command line. The '< >' characters signify the need for you to
replace the generic string with one of your own.

The above syntax indicates that any of the possible parameters to PATCH are
optional. All three types of parameters may also appear in any order.

The UpdateDirectory specifies the directory holding the files to be updated. If
the user does not specify an UpdateDirectory, the UpdateDirectory becomes the
directory that contains the patch file. Universal Naming Convention
specifications are supported for the update directory; any drive or directory
on a network is accessible through a UNC path, i.e.,
'\\SERVERNAME\SHARENAME\DIRNAME'.

The PatchFile parameter specifies the patch file that PATCH should apply. If no
PatchFile is specified, PATCH looks for the file PATCH.RTP.

The Options parameter controls the process of applying a patch file. Options
are preceded by a dash. Options are lower-case single characters unless more
characters are needed for uniqueness.

Any PATCH behavior that has on and off states is controlled by two options, one
for the "on" state and one for the "off" state. Options that toggle off a state
are generally three letters long; the first two are for the word "no". For
instance, -b turns on the backup option, and -nob turns it off.


Finding the Correct Files to Patch
==================================

PATCH searches for the file to be patched in the following places:

1. User specified update directory, or the current directory if the user does
   not specify one,
2. Subdirectories of the update directory, and
3. Directories listed on the PATH environment variable.
4. Locations specified by ROOTKEY, SYSTEMKEY s or SYSTEMTAG s within the patch
   file itself

The searching for files in places (2) & (3) can be toggled using PATCHBLD
commands or PATCH options.

Once PATCH has located a file of the correct name, it needs to verify that it
is the correct file. It does this by comparing the file's size and checksum. A
checksum is computed using a mathematical formula to combine the bytes in a
file. If the name, size, and checksum all match for a file, it is highly
improbable that the wrong file has been located.

If PATCH locates a file by name that does not match the other criteria, it
continues to search the rest of the directories for the correct file.


RTPatch Apply Command Line Options
==================================

Any input given to PATCH must be provided on the command line in the following
format:

patch [Options][<UpdateDirectory>][<PatchFile>]

The UpdateDirectory and PatchFile are both optional and can be specified in
either order.

Update Directory
----------------
The UpdateDirectory specifies the directory holding the files to be updated. If
the user does not specify an UpdateDirectory, then it is set to the current
directory.

PATCH looks in the following directories for the files to update:

1. The specified UpdateDirectory;
2. Subdirectories of UpdateDirectory; and
3. Directories along PATH environment variable.

Searching the subdirectories can be disabled using the -nosubdirsearch option.
The -nopathsearch option can be used to disable searching the directories along
the PATH variable.

Patch File
----------
The PatchFile parameter specifies the patch file that PATCH should apply.
Absolute and relative path names can be used. If no PatchFile is specified,
PATCH looks for a file having the default name - PATCH.RTP.

PATCH looks for the patch file in the following directories, in this order:

1. Specified Directory (or Current if none specified);
2. Directory from which PATCH was run; and
3. The user is prompted for the location of the patch file.

Options control the process of applying a patch file. To designate an option,
the option letter must be preceded by a dash '-'; either uppercase or lowercase
letters may be used. Furthermore, options can be entered anywhere on the
command line - not just immediately after 'patch'.

Each entry in the following pages provides the syntax of the option(s), the
user level(s) under which the option(s) may be used, a brief description, any
additional comments, and a simple example. The format of each syntax entry is
as follows:

1. All options may be abbreviated. Only the letters needed to uniquely identify
   an option must be typed; these are listed before the square brackets '[ ]'.
   For example, the -file option may be abbreviated as -f. When entering an
   option on the command line, either uppercase or lowercase letters may be
   used.

2. Items in square brackets '[ ]' are optional. Do not type the brackets if you
   include an optional item.

3. Names in angle brackets '< >' are dummy names. You must supply the actual
   names. Do not type the brackets.

4. Items followed by an ellipsis '...' may be repeated any number of times.

5. Any other symbols, including spaces, should be entered exactly as they
   appear in the syntax statement.

If two options toggle a feature, they are listed in the same entry. For
example, the -undo and -noundo options are both listed under -undo in the
alphabetical listing.

PATCH always has a default setting for any feature affected by a toggle. Note
that the phrase 'default setting' can mean one of two things here: the default
setting from the patch file builder's perspective or the default setting from
the PATCH user's perspective. The defaults documented in the following
descriptions are those from the patch file builder's perspective.

The setting for a feature affected by a toggle is placed in the patch file when
PATCHBLD is run; this is the default setting from the PATCH user's perspective.
If a PATCHBLD command which affects the feature is not given, the setting
placed in the patch file will be the one documented as 'default' below.

In each example, it is assumed that PATCH and the patch file, PATCH.RTP, are in
the current directory, and that the old system is in the directory \ORIGINAL.


ADDDEPTH
========

Control the depth of directories that must exist on a target machine, if a new
file is to be added.

Syntax:  -oa[dddepth]:#

User Level: ADVANCED

Description:
------------
ADDDEPTH is used to conditionally add files based on the existence of the
directory to which RTPatch would add the file by default. By default, RTPatch
will automatically create new subdirectories based on the CREATESUBDIR setting.
By using "-oaddepth:#" -- where # refers to the minimum directory depth,
relative to the main update directory, you can control the number of
directories that are required to preexist for an ADD patch to be processed.

See Also: PATCHBLD's ADD command

Example:
--------
Assume the main update folder is C:\DIR1, and a patch is to be added to
C:\DIR1\DIR2\NEW_FILE.TXT. Applying the patch with:

	patch PATCH.RTP -oadddepth:1

will cause the file to be added if and only if C:\DIR1\DIR2 already exists
(C:\DIR1 is the main folder, and C:\DIR1\DIR2 represents depth "1" under the
main folder). Similarly, if the file to be added is
C:\DIR1\DIR2\DIR3\NEW_FILE2.TXT, it will only be added if C:\DIR1\DIR2 exists.
If it does, then the new directory "DIR3" is created subject to the value of
CREATESUBDIR (default on) and the file is added in the new directory.


ALLOWSPLIT/NOALLOWSPLIT
=======================

Toggle whether PATCH will apply a patch file that is split across multiple
volumes

Syntax:  -a[llowsplit]
	 -noa[llowsplit]

Default: -allowsplit

User Level: ADVANCED

Description:
------------
The -allowsplit option causes PATCH to be capable of applying patches split
across multiple volumes.

The -noallowsplit option prevents PATCH from attempting to apply patch files
that have been split across multiple volumes or accidentally truncated.

Patch files may be split across multiple volumes using the split utility
program. When patch files are transmitted electronically, they may accidentally
become truncated by the transmission process. In this case, the patch file
appears to PATCH as if it was intentionally split by the patch builder. Thus,
PATCH will ask for the next volume when it reaches the end of the truncated
patch file. -noallowsplit causes PATCH to quit with an error rather than
attempt to apply a truncated patch file.

See Also: PATCHBLD's ALLOWSPLIT command

Example:
--------
Suppose you are transmitting patch files electronically, and you want PATCH to
quit with an error rather than asking for another disk in the event that a
patch file accidentally becomes truncated during transfer. To update the
contents of the current directory from a patch file having the default name
PATCH.RTP, run:

	patch -noallowsplit


BACKUP/NOBACKUP
===============

Toggle backing up the original system

Syntax:  -b[ackup][:<Directory>]
	 -nob[ackup]

Default: -nobackup

User Level: ADVANCED, BASIC, BACKUP

Description:
------------
The -backup option causes PATCH to make backup copies of any files affected by
the updating process. The optional directory parameter specifies the directory
where the backups will be stored. If this directory does not exist, PATCH will
create it.

If there is insufficient space on the disk for the backup files, PATCH will not
apply any patches.

The -nobackup option prevents PATCH from backing up the files which get
updated.

If backups are made and if no backup directory is specified (either when the
patch file is built or when PATCH is run), then the backup copies will be
placed in a subdirectory, called backup, of the directory being updated.

When an automatic backup occurs, PATCH will also create a file called
UNPATCH.BAK. This file is a batch file consisting of the commands necessary to
automatically restore the original system. It is called ".BAK" instead of
".BAT" so that it will not be accidentally run; the user must rename it to
"UNPATCH.BAT" before running it.

The backup process causes the original files to be saved with invented names in
a backup directory. The UNPATCH.BAK file will restore the originals over the
modified files, preserving directory structure; UNPATCH.BAK will also delete
files that were added by the patch and restore files that were deleted by the
patch. Additionally, if changes were made to the registry or INI files with a
registry script, UNPATCH.BAK will restore the registry or INI files to their
original states (with certain exceptions; see 'Updating the Registry and INI
Files', for details). You can avoid having the registry restored by commenting
out or removing the last line of UNPATCH.BAK.

For using UNPATCH.BAK with the ANSI patch apply program PATCHA, see the section
entitled "Character Sets in Patch Apply" in "Patchbld Command Files".

See Also: PATCHBLD's BACKUP command

Example:
--------
To update the system contained in \ORIGINAL and store backups of altered files
in the directory \OLDSYS, run:

	patch -backup:\oldsys \original

from the command line.


CONFIRM/NOCONFIRM
=================

Toggle asking for confirmation of the update directory

Syntax:  -c[onfirm]
	 -noc[onfirm]

Default: -confirm

User Level: ADVANCED

Description:
------------
The -confirm option causes PATCH to ask for confirmation when it finds a
directory on the basis of a SystemTag file.

The -noconfirm option prevents PATCH from asking for confirmation when it finds
the SystemTag file.

When you use the SYSTEMTAG command to update subsystems of files, PATCH will
automatically determine update directories associated with the SystemTag files.
The -noconfirm switch simply determines if PATCH will use confirmation dialog
messages with the end-user as a way to double check whether the correct update
directory has been found. If -noconfirm is used, PATCH will assume that the
first directory in which the SystemTag file is found is the correct update
directory.

See Also: PATCHBLD's CONFIRM command

Example:
--------
To cause PATCH to assume that the first directory in which a SystemTag file is
found is the correct update directory, run

	patch -noconfirm

from the command line.


DRIVE
=====

List drives to search for subsystems of a patch file

Syntax:  -d<drive1><drv2><drv3>...
	 -d*
	 -d**

Default: The current drive

User Level: ADVANCED, BASIC

Description:
------------
The -d option is only used when the patch file is updating multiple subsystems
of a file system. The option specifies which drives to search for the
subsystems. PATCH will search these drives to locate the SystemTag files of the
subsystems. If '*' is used, then all local hard drives on the user's system
will be searched for the SystemTag files. If '**' is used, then all local hard
drives and all mapped network drives will be searched.

See Also: PATCHBLD's SYSTEMTAG and SYSTEMNAME commands

Example:
--------
To apply a patch file to a product that has multiple subsystems spread
throughout multiple drives and directories, you must first create a patch file
for this purpose using the commands listed above in the 'See Also' section of
this command description.

Using the command line:

	patch -dcdh

will cause PATCH to search for SystemTag files on the c:, d:, and h: drive of
the end-user machine.


ERRORFILE/NOERRORFILE
=====================

Specify whether PATCH will log error and warning messages to a file.

Syntax:  -e[rrorfile]
	 -noe[rrorfile]

Default: -noerrorfile

User Level: ADVANCED

Description:
------------
The -errorfile option causes PATCH to log all error and warning messages to the
file PATCH.ERR. This file will be created in the update directory. If a run of
PATCH has no errors or warnings, no file will be created. This option is
helpful for tracking down problems at an end-user's site.

The -noerrorfile option prevents PATCH from logging errors to a file.

This option can also be specified in a PATCHBLD command file.

Example:
--------
Simply use the -errorfile option somewhere on the command line.


FILE
====

Update only a specified entry

Syntax:  -f[ile]:<EntryName>

User Level: ADVANCED, BASIC

Description:
------------
The -file option allows the PATCH user to update a specific file. Note that if
a set of files were grouped together (using the GROUP command) when the patch
file was built, then all of the files in the group will be updated. Only the
specified file or group of files will be updated.

The EntryName parameter is the entry name associated to the file or group. For
a single file, the entry name is just the file's name; for a group of files,
the entry name is the name of the file which was listed first in the group.
However, you can use the PATCHBLD NAME command to override any default names.

See Also: PATCHBLD's GROUP and NAME commands

Example:
--------
To update the payroll data file, salary.dat, in the directory \PAYROLL from the
patch file UPDATE.RTP (which is in the current directory), run:

	patch -file:salary.dat \payroll update.rtp

from the command line.


GETFROMSTDIN
============

Read the patch file from the standard input stream

Syntax:  -g[etfromstdin]

User Level: ADVANCED

Description:
------------
The patch file can be read from the standard input stream instead of the disk.
This is useful primarily if the patch file is transferred electronically to the
standard output stream on the user's system. To have PATCH read the patch file
from standard input, use the -getfromstdin switch on the command line, and do
not put a patch file name on the command line. If stdin is not redirected,
PATCH will indicate that it cannot find the patch file and will prompt the user
for its location. If stdin is redirected, but does not contain a patch file,
then PATCH will fail with an error.

Example:
--------
If the user downloads a patch file to the standard output stream, it can be
applied with the command line:

	patch -getfromstdin <update directory>

Notice that no patch file name is put on the command line.


HELP
====

Display help text

Syntax:  -help or -?

User Level: ADVANCED, BASIC, BACKUP

Description:
------------
The -help option displays a brief list of PATCH options and their syntax. This
is useful for finding the name of a particular option.

PATCH will only print allowable options, based on the user level set in the
patch file.

After printing the help text, PATCH terminates with a DOS exit code of zero.

NOTE: The amount of options displayed depends on the user level recorded in the
      patch file by the PATCHBLD USERLEVEL command; ADVANCED user level (all
      options available) is the default.

If no patch file is found (see the search criteria described at the beginning
of the section), PATCH will only display command syntax.

Example:
--------
To see the options available for the patch file PATCH.RTP, make the directory
containing PATCH.RTP the current directory and run:

	patch -help

from the command line.


IGNOREMISSING/NOIGNOREMISSING
=============================

Toggle error condition if file is missing

Syntax:  -i[gnoremissing]
	 -noi[gnoremissing]

Default: -noignoremissing

User Level: ADVANCED

Description:
------------
The -ignoremissing option informs PATCH that it is not an error condition if an
original file is missing. In some cases, an end-user may not have installed the
complete system. In this case, PATCH should update whatever files are present.

If the end-user later installs another portion of the system, from the original
disks, PATCH should be run again. Otherwise, the end-user may have a
partially-patched system.

The -noignoremissing option causes PATCH to treat the absence of an original
file as an error condition.

See Also: PATCHBLD's IGNOREMISSING command

Example:
--------
Suppose the PATCH user only has part of the system installed. To update the
existing files contained in \ORIGINAL from the patch file UPDATE.RTP, run:

	patch -ignoremissing \original update

from the command line.


JUSTCHECKFILES
==============

Tells PATCH to test apply a patch

Syntax:  -j[ustcheckfiles]

Description:
------------
The -justcheckfiles switch causes PATCH to go through the motions of patching
files without actually applying patches. PATCH will make callbacks as it passes
each file and will in all other respects act as though it is patching the
files, even though it is not. The statistical summary at the end will reflect
the patches that would have been done if the -j switch had not been there. In
particular, if you use the -justcheckfiles and -ignoremissing switches
together, PATCH will check all the files in the patchfile for validity and
report how many were correct and how many were not in the statistical summary.
The -j switch will work in conjunction with the -f switch and just check a
single file, if you only need to check particular files.

Example:
--------
Suppose you want to test patching a file named PATCH.DLL before applying the
patch permanently, run:

	patch -justcheckfiles -f:patch.dll

from the command line.


LIST
====

Display information on patch file entries

Syntax:  -l[ist]

User Level: ADVANCED, BASIC

Description:
------------
The -list option displays information about the entries within the patch file.
The information listed includes comments, the PATCH flag settings in effect
(e.g., UNDO or NOUNDO), and what types of patches (add, delete, or modify) will
occur when a patch file is applied to a system.

Note: The -list and -verbose options are mutually exclusive. If both options
      are present on the command line, the command mentioned last will take
      precedence.

Example:
--------
To see what will happen when PATCH uses the patch file PATCH.RTP to update a
system, make the directory containing PATCH.RTP the current directory. Then
run:

	patch -list

from the command line.


NODELAYCOPY
===========

Turn off delay copy support for open files

Syntax:  -nod[elaycopy]

User Level: ADVANCED

Description:
------------
The -nodelaycopy turns of the Win32 feature that allows open files to be
patched following a reboot of the system. When using this command, an error
will be produced when a locked file is encountered.

Example:
--------
If you have a system that cannot be rebooted under any circumstances, then run:

	patch -nodelaycopy

from the command line.


MEMBERSHIP
==========

Apply the patch file entries for a named membership group.

Syntax:  -om[embership]:<GROUPx>

User Level: ADVANCED

Description:
------------
The -omembership option instructs RTPatch to apply the patch file entries that
belong to a named membership. Files can be associated with membership groups at
Build time using RTPatch Build's MEMBERSHIP command. At apply time, you may
specify zero or more membership groups on the command line. For example:

	-om:GROUP1 -om:GROUP2

would apply the patches for all patch file entries that belong to no membership
group, GROUP1, or GROUP2.

See Also: RTPatch Build's MEMBERSHIP command.

Example:
--------
See RTPatch Build's MEMBERSHIP command for an example of using the MEMBERSHIP
option.


MESSAGE/NOMESSAGE
=================

Toggle printing a message on error

Syntax:  -m[essage]
	 -nom[essage]

Default: -message

User Level: ADVANCED

Description:
------------
The -message option causes PATCH to print a message whenever an error occurs.

The -nomessage option is used to suppress patch file comments and any error or
warning messages produced by PATCH.

When an error occurs, PATCH returns a non-zero exit code (regardless of whether
or not a message is printed). Otherwise, PATCH returns zero. If you are using
PATCH as part of your own install program and want only your error messages to
come to the screen, it might be best to issue the PATCHBLD NOMESSAGE command
when building the patch file.

Note that the -nomessage command line option of PATCH is slightly different
than the NOMESSAGE command in PATCHBLD. When you use the -nomessage command
line option, it also disables the PATCH banner. This is commonly used by
programs that spawn PATCH.

See Also: -quiet and -verbose options, and PATCHBLD's MESSAGE and PATCHWARNINGS
	  commands


PATHSEARCH/NOPATHSEARCH
=======================

Toggle searching the PATH for files

Syntax:  -p[athsearch]
	 -nop[athsearch]

Default: -pathsearch

User Level: ADVANCED

Description:
------------
The -pathsearch option causes PATCH to search the directories listed along the
PATH environment variable for files to update.

The -nopathsearch option prevents PATCH from searching the PATH for files.

When PATCH searches for files to update, it first looks in the update
directory. If a directory is given to PATCH on the command line, it becomes the
update directory; otherwise, the current directory is the update directory.

After looking in the update directory, PATCH searches any subdirectories of the
update directory, unless the NOSUBDIRSEARCH command was issued when the patch
file was built or the -nosubdirsearch option was given on PATCH's command line.

If a file still cannot be found, PATCH searches the directories listed along
the PATH environment variable, unless the NOPATHSEARCH command was issued when
the patch file was built or the -nopathsearch option was given on PATCH's
command line.

Even though PATCH searches extensively for files, it is very careful to update
the correct files. In addition to checking a file's name and size, PATCH
computes a checksum for the file and compares this number to the checksum of
the original file.

See Also: -subdirsearch option, and PATCHBLD's PATHSEARCH and SUBDIRSEARCH
	  commands

Example:
--------
To prevent PATCH from searching any directories other than the current
directory (and its subdirectories) for files to update, run:

	patch -nopathsearch

from the command line.


QUIET
=====

Run in quiet mode

Syntax:  -q[uiet]

User Level: ADVANCED

Description:
------------
The -quiet option causes PATCH to run in quiet mode. No messages are displayed
except for patch file comments, error and warning messages. Normally, PATCH
will print file-by-file messages while executing.

This option is often used by programs that spawn PATCH.

See Also: -verbose and -nomessage options, and PATCHBLD's PATCHQUIET and
	  PATCHVERBOSE commands

Example:
--------
To prevent PATCH from printing anything to the screen while it updates the
contents of \ORIGINAL from the patch file UPDATE.RTP, run:

	patch -quiet -nomessage \original update

from the command line.


RECYCLEBIN/NORECYCLEBIN
=======================

Move deleted files to the RecycleBin

Syntax:  -or[ecyclebin]
	 -noor[ecyclebin]

Default: -noor[ecyclebin]

User Level: ADVANCED

Description:
------------
The -orecyclebin command causes RTPatch to move all deleted files to the user's
RecycleBin rather than completely deleting the files from the system. This is
useful if the user later decides to restore a patched file. -noorecyclebin will
restore RTPatch's default behavior.

NOTE: Using the RecycleBin can be noticeably slower than simple files deletes,
      since the file is being moved. If patch apply speed is a priority, you
      should not use the -orecyclebin command.

NOTE: Any files that are delayed patched (i.e., patched upon reboot due to
      being locked at the time of patch Apply), will NOT be moved to the
      RecycleBin, even if marked as such.

Example:
--------
To cause RTPatch to use the RecycleBin for deleted files, run:

	patch -or

from the command line


SEARCHROOT/NOSEARCHROOT
=======================

Toggle searching the of the root update directory for files to patch.

Syntax:  -os[earchroot]
	 -onos[earchroot]

Default: -osearchroot

User Level: ADVANCED

Description:
------------
-onosearchroot disables the default search of the root update directory in the
event that a file cannot be located in its "expected" subdirectory.

Example:
--------
If you have a file that you want to patch only in its intended subdirectory,
and not in the root of the update directory, add the command line switch

	-onosearchroot

to your call to RTPatchApply32 or PATCH.EXE


SUBDIRSEARCH/NOSUBDIRSEARCH
===========================

Toggle searching the update directory's subdirectories for files to update

Syntax:  -s[ubdirsearch]
	 -nos[ubdirsearch]

Default: -subdirsearch

User Level: ADVANCED

Description:
------------
The -subdirsearch option causes PATCH to search any subdirectories of the
update directory for files. Note that the update directory is the directory
containing files to update; if this directory is not specified on PATCH's
command line, it is the current directory.

The -nosubdirsearch option prevents PATCH from searching the subdirectories of
the update directory.

When PATCH searches for files to update, it first looks in the update
directory. After looking in this directory, PATCH searches any subdirectories
of the update directory, unless the NOSUBDIRSEARCH command was issued when the
patch file was built or the -nosubdirsearch option was given on PATCH's command
line.

If a file still cannot be found, PATCH searches the directories listed along
the PATH environment variable, unless the NOPATHSEARCH command was issued when
the patch file was built or the -nopathsearch option was given on PATCH's
command line.

Even though PATCH searches extensively for files, it is very careful to update
the correct files. In addition to checking a file's name and size, PATCH
computes a checksum for the file and compares this number to the checksum of
the original file.

See Also: -pathsearch option, and PATCHBLD's PATHSEARCH and SUBDIRSEARCH
	  commands

Example:
--------
To prevent PATCH from searching any subdirectories of the update directory,
run:

	patch -nosubdirsearch

from the command line.


TEMPDIR
=======

Instruct RTPatch to use an alternate location for temporary files

Syntax:  -ot[empdir][:<Directory> |<*> | <environment variable>]

User Level: ADVANCED

Description:
------------
The -otempdir command instructs RTPatch to use an alternate location for
temporary files during the patching process. The default is for temporary files
to be placed in the same location as the file being patched.

Occasionally, it may be necessary to use an alternate storage location for
temporary files. This is particularly helpful when using the UNDO option with a
very large system of files. Under default settings, the target device would
have to be large enough for the old system and the new system for the patch
process to have enough space. By using -otempdir, a second storage device can
be used prior to the changes being committed (copied to the target device).

Copying files from one storage device to another is time consuming. It is
recommended that only those with very restricted storage options use this
command.

Three parameter types are accepted by -otempdir:

1. explicitly named directory (e.g., '-otempdir:d:\temp')
2. an environment variable (e.g., '-otempdir:TEMP')
3. a wildcard, which instructs RTPatch to enumerate all local and networked
   devices until a device with suitable free space is located (e.g.,
   '-otempdir:*')

See Also: PATCH's -undo command, PATCHBLD's TEMPDIR command

Example:
--------
To use an explicitly named directory, run:

	patch '-otempdir:d:\temp'

from the command line.


TZCHECK/NOTZCHECK
=================

Toggle whether PATCH checks the hour component of a file's timestamp

Syntax:  -t[zcheck]
	 -not[zcheck]

Default: -tzcheck

User Level: ADVANCED

Description:
------------
The -notzcheck option causes PATCH to apply patches for files with timestamps
that differ from the original timestamps by an integral number of hours. This
can happen when files are transferred across time zones on file systems (such
as NTFS) that maintain a file time as 'Greenwich Mean Time + Local Offset'.

The -tzcheck option restores the default behavior of PATCH, i.e., if
CHECKTIMEDATE was enabled at build time, PATCH will only apply a patch to a
file if that file has exactly the same timestamp as the original file from
which the patch was built.

See Also: PATCHBLD's TZCHECK and CHECKTIMEDATE commands

Example:
--------
Suppose a file on an NTFS partition has a timestamp that is different by an
integral number of hours from the timestamp of the original from which the
patch was built, and that CHECKTIMEDATE was enabled at build time. To update
the contents of the current directory from a patch file having the default name
PATCH.RTP, run:

	patch -notzcheck

from the command line.


UNDO/NOUNDO
===========

Toggle undoing all patches on error

Syntax:  -u[ndo]
	 -nou[ndo]

Default: -noundo

User Level: ADVANCED, BASIC

Description:
------------
The -undo option causes PATCH to undo any changes if an error occurs; any files
which have been patched will be restored to their original form.

If any changes have been made to the registry or INI files with a registry
script, then -undo will also cause the registry and INI files to be restored to
their original states (with certain exceptions; see "Updating the Registry and
INI Files", for details).

The -noundo option prevents PATCH from backing out of any changes when an error
occurs. The files that have been patched will remain patched, and changes made
to the registry or INI files with a registry script will remain.

In order to undo patches, there must be room on the disk for the original files
and for the newly-patched files. If there is insufficient room on the disk,
PATCH will not apply any patches.

PATCH implements the undo feature as follows. For each file which needs to be
patched, a temporary patched version of the file is created in the same
directory as the original file. This temporary version is given a unique name
of the form rtxxxxxx, where the string 'xxxxxx' is some sequence of letters and
numerals. Once all patched versions of files are successfully created, the
original versions are deleted and the patched versions are renamed
appropriately. If an error occurs before all files are patched, the temporary
files are deleted and the original system is left intact.

If the patching process is interrupted (for example, because of a power
outage), then the state of the system depends upon whether -undo or -noundo was
specified. See the 'Rerunning PATCH' section of the 'Applying a Patch File'
section for more information on partially-updated systems.

See Also: PATCHBLD's UNDO command

Example:
--------
Suppose there is not enough disk space to implement the -undo feature but the
UNDO command was specified when the patch file was built. To update the
contents of the current directory from a patch file having the default name
PATCH.RTP, run:

	patch -noundo

from the command line.


VERBOSE
=======

Run in verbose mode

Syntax:  -v[erbose]

User Level: ADVANCED, BASIC

Description:
------------
The -verbose option causes PATCH to display brief status messages to the screen
during execution. This is the default behavior of PATCH.

Note: The -list and -verbose options are mutually exclusive. If both options
      are present on the command line, the command mentioned last will take
      precedence.

See Also: -quiet and -message options, and PATCHBLD's PATCHVERBOSE and
	  PATCHQUIET commands

Example:
--------
Suppose the patch file with the default name PATCH.RTP was made with the
PATCHQUIET command. To update the current directory in verbose mode, run:

	patch -verbose

from the command line.


WARNREBOOT
==========

Have RTPatch set an error level if a reboot is required to for all patching
changes to take effect.

Syntax:  -w[arnreboot]

User Level: ADVANCED

Description:
------------
The -warnreboot command causes RTPatch APPLY to return a value of 0x4000 in the
event that delayed patching was required during the patch process.


Quick Reference Card
====================

This Quick Reference card shows all of the Apply command line options for
PATCH.EXE.


Option Abbr.	  Full Name	  Description
------------	  ---------	  -----------
-a (default)	  Allowsplit	  Toggle whether PATCH will attempt to apply
-noa		  NoAllowsplit	  split patch file

-b[:<directory>]  Backup	  Toggle backing up changed files in the
-nob (default)	  NoBackup	  original system

-c (default)	  Confirm	  Toggle confirmation message of correct update
-noc		  NoConfirm	  directory

-d<drv1><drv2>,... (Drive Search) Specify drives to search for systems to patch
-d*				  specifies that all local drives be searched
-d**				  specifies that all local and mapped network
				      drives be searched

-e		  Errorfile	  Toggle whether PATCH logs error messages to a
-noe (default)	  NoErrorfile	  file

-f:<name>	  File		  Update only a specified file

-g		  Getfromstdin	  Allows PATCH to read a patch file from the
				  standard input stream

-h		  Help		  Display PATCH's help text then terminate

-i		  Ignoremissing   Toggle error condition if file is missing
-noi (default)	  NoIgnoremissing

-j		  Justcheckfiles  Run the patch without actually applying the
				  patch

-l		  List		  Display information on patch file

-m (default)	  Message	  Toggle printing a message on error
-nom		  NoMessage

-onow		  NoWISupport	  Disables the application of changes to
				  Windows Installer databases caused by the use
				  of the MSIDATABASE and MSIFILE commands

-p (default)	  Pathsearch	  Toggle searching directories along the PATH
-nop		  NoPathsearch	  for files

-q		  Quiet 	  Run in quiet mode

-t		  TZcheck	  Toggle whether PATCH checks the hour portion
-not		  NoTZcheck	  of a file's timestamp

-s (default)	  Subdirsearch	  Toggle searching subdirectories of the update
-nos		  NoSubdirsearch  directory

-u		  Undo		  Toggle undoing all patches on error
-nou (default)	  NoUndo

-v (default)	  Verbose	  Run in verbose mode


Some options may not be available, depending on the user level which you set
when creating the patch file. The default user level is ADVANCED which makes
all options available; however, this can be changed with the USERLEVEL command.
The user levels are listed in the following table.

User Level	PATCH Options Available
----------	-----------------------
ADVANCED	All PATCH options available
NONE		No PATCH options available
BACKUP		-b, -nob, -h
BASIC		-b, -nob, -d, -f, -h, -l, -q, -u, -nou, -q, -v


PATCH Quick Reference
=====================

Syntax: patch [Options] [<UpdateDirectory> [<PatchFile>]]

By default, UpdateDirectory is the current directory and PatchFile is
PATCH.RTP. The minimum user level required to use an option is listed in the
middle column below.


Option		       User Level   Description
------		       ----------   -----------

-a[llowsplit]		ADVANCED    Toggle whether split patch file will be
-noa[llowsplit] 		    applied

-b[ackup][:<directory>] BACKUP	    Toggle backing up the original system
-nob[ackup]

-c[onfirm]		BASIC	    Toggle printing of confirmation messages
-noc[onfirm]

-d<drivespec>[<drivespec>...]	    List drive letters for drives to search
-d*				    specifies that all local drives be searched
-d**			BASIC	    specifies that all local and all mapped
					network drives be searched

-e[rrorfile]		ADVANCED    Toggle whether error messages logged to a
-noe[rrorfile]			    file

-f[ile]:<entryname>	BASIC	    Update only a specified entry

-g[etfromstdin] 	ADVANCED    Allow PATCH to read a patch file from the
				    standard input stream file

-h or -?		BACKUP	    Display help text

-i[gnoremissing]	ADVANCED    Toggle error condition if file is missing
-noi[gnoremissing]

-j[ustcheckfiles]	BASIC	    Run the patch without actually applying
				    the patch

-l[ist] 		BASIC	    Display information on patch file entries

-om[embership]:<GROUPx> ADVANCED    Apply the patch file entries for a named
				    membership group. Note that GROUPx is of
				    the form GROUP0-GROUP9.

-m[essage]		ADVANCED    Toggle printing a message on error
-nom[essage]

-onow[isupport] 	ADVANCED    Disables the application of changes to
				    Windows Installer databases caused by the
				    use of the MSIDATABASE and MSIFILE commands

-p[athsearch]		ADVANCED    Toggle searching the PATH for files
-nop[athsearch]

-q[uiet]		ADVANCED    Run in quiet mode

-s[ubdirsearch] 	ADVANCED    Toggle searching update directory's
-nos[ubdirsearch]		    subdirectories for files

-t[zcheck]		ADVANCED    Toggle whether the hour portion of a file's
-not[zcheck]			    timestamp will be checked

-u[ndo] 		BASIC	    Toggle undoing all patches on error
-nou[ndo]

-v[erbose]		BASIC	    Run in verbose mode


Getting On-Line Help (-h)
=========================

To view PATCH's help text, simply pass PATCH the -help option. Only those
options available to the PATCH user will be listed; the level of allowable
options is set when the patch file is built. Consequently, a patch file name
must be specified (unless it is PATCH.RTP and the patch file is in the current
directory), since PATCH does not know the user level until it reads the patch
file.

For example, if the patch file, PATCH.RTP, is in the current directory, you can
see the available options by running:

	patch -help

from the command line.

After printing the help text, PATCH terminates with an exit code of zero.


Listing Files to be Patched (-l)
================================

To see what actions PATCH will perform, use the -list option. This causes PATCH
to list the files that will be modified, added, renamed, or deleted. PATCH will
also print any comments placed in the patch file with PATCHBLD's COMMENT
command.

In addition, PATCH will report the settings in effect. That is, PATCH will
state the user level, the output mode, whether or not backups will be made,
etc. These settings are established when the patch file is built.

The USERLEVEL PATCHBLD command controls which options are available and which
cannot be changed by the PATCH user.


Updating a Single File (-f)
===========================

While a patch file may contain patching information for many files, you may
only wish to update (or add) a single file. In this case, use PATCH's -file
option.

For example, to update the payroll data file, salary.dat, in the directory
\PAYROLL from the patch file UPDATE.RTP (which is in the current directory),
run:

	patch -f:salary.dat \payroll update.rtp

from the command line; no other patches contained in the patch file will be
applied to the old system.


Locating Files to Patch (-s and -p)
===================================

When PATCH searches for files to update, it looks in the following places:

1. Main Update directory
2. Subdirectories of the update directory;
3. Directories listed on the PATH environment variable.
4. SYSTEMKEY/SYSTEMTAG location

Searching of the subdirectories of the updated directory can be disabled using
the -nosubdirsearch option. This can also be set at build time using the
PATCHBLD NOSUBDIRSEARCH command.

The default behavior of PATCH can be restored either with the -subdirsearch
option when PATCH is run or with the PATCHBLD SUBDIRSEARCH command when the
patch file is built.

PATCH can be prevented from searching the PATH for files by giving the
-nopathsearch option on the command line or by issuing the PATCHBLD
NOPATHSEARCH command when the patch file is made.

The default behavior of PATCH can be restored either with the -pathsearch
option when PATCH is run or with the PATCHBLD PATHSEARCH command when the patch
file is built.

Even though PATCH searches extensively for files, it is very careful to update
the correct files. In addition to checking a file's name and size, PATCH
computes a checksum for the file and compares this number to the checksum of
the original file.

NOTE:
-----
PATCH can be instructed to search the PATH for a particular file by naming the
file and the PATHSEARCH command within a PATCHBLD BEGINFILE/ENDFILE file block.

This allows using the PATHSEARCH command file-by-file rather than toggling it
on for all files. See the 'Specifying Individual File Processing Behavior'
section of 'PATCHBLD Command Files' for more on this subject.

PATCH can use key values in the registry or INI files to locate the files to be
patched. Either the update directory or specific system directories may be
retrieved from the registry or INI files on the end-user's machine. A
registry/INI key may be embedded in a patchfile. Then, if no update directory
is specified on the command line and the value of this key can be retrieved
(and specifies an existing directory), it is used as the update directory for
the patch application. Each separate system can also have a similar key
associated with it, so that no actual searching needs to be done at apply time.
Unless the patch is applied under DOS, a warning is issued if the key cannot be
located. See 'PATCHBLD Command Files' for more information.


Locating File Systems to Patch (-d and -c)
==========================================

Options -d and -confirm are relevant only when you are updating multiple file
systems with one patch file. This feature is activated when you build the patch
file using the BEGINSYSTEM / ENDSYSTEM commands of PATCHBLD. See the 'Updating
Multiple File Systems' section of 'PATCHBLD Command Files'.

Once you create a patch file to update multiple file systems, PATCH allows
users to specify multiple drives to search for the file systems. This is
accomplished with the -d option; simply list drive letters immediately after
the option. The following example would specify the c: and d: drives on a
machine:

	patch -dcd

If you specify '-d*', then all local hard drives on the system will be
searched. If you specify '-d**', then all local hard drives and all mapped
network drives will be searched.

PATCH searches the drives for a file that you choose as a tag for locating the
file systems. Once the tagged file is located, PATCH begins applying the patch
file. If the -d option is not specified, PATCH will search the current disk
drive on which the patch file is located.

The -confirm option has PATCH display a confirmation message with a yes/no
response. The message will display the name of the directory that it has chosen
as the update directory. The -noconfirm option disables confirmation messages.


Controlling Screen Output (-q and -v)
=====================================

PATCH may be placed in one of two output modes, quiet and verbose. In quiet
mode, PATCH does not print anything to the screen. This allows PATCH to be
spawned from your own updating program. PATCH can be put into quiet mode either
by issuing the PATCHQUIET command when the patch file is built or by giving the
-quiet option on the command line.

In verbose mode, PATCH prints a number of messages. In particular, it details
which files are being modified, added, renamed, or deleted; additionally,
comments are printed. This is the default output mode for PATCH. Giving the
-verbose option on the command line puts PATCH into verbose mode, if the QUIET
command was used when building the patch.


Backing Up Affected Files (-b)
==============================

By default, PATCH will not make backup copies of changed files when it updates
a system. However, PATCH will backup any files affected by the updating process
if the -backup option is given on the command line or if the BACKUP command was
issued when the patch file was created.

For example, to update the files in \PROGRAM and place backup copies of altered
files in \PROGRAM\OLDSYS, run:

	patch -b:\program\oldsys \program

where the patch file PATCH.RTP is assumed to be in the current directory. If no
backup directory is specified (either when the patch file is built or when
PATCH is run), then the backup copies will be placed in a subdirectory, called
backup, of the directory being updated.

When an automatic backup occurs, PATCH will also create a file called
UNPATCH.BAK. This file is a batch file consisting of the commands necessary to
automatically restore the original system. It is called ".BAK" instead of
".BAT" so that it will not be accidentally run; the user must rename it to
"UNPATCH.BAT" before running it.

The backup process causes the original files to be saved with invented names in
a backup directory. The UNPATCH.BAK file will restore the originals over the
modified files, preserving directory structure; UNPATCH.BAK will also delete
files that were added by the patch and restore files that were deleted by the
patch.

Additionally, if changes were made to the registry or INI files with a registry
script, UNPATCH.BAK will restore the registry or INI files to their original
states (with certain exceptions; see 'Updating the Registry and INI Files', for
details). You can avoid having the registry restored by commenting out or
removing the last line of UNPATCH.BAK.

For using UNPATCH.BAK with the ANSI patch apply program PATCHA, see the section
entitled "Character Sets in Patch Apply" in "Patchbld Command Files".

The default behavior of PATCH can be restored either with the -nobackup option
when PATCH is run or with the NOBACKUP command when the patch file is built.

NOTE: We recommend making a separate backup copy of an original system before
      it is updated. Even though PATCH can backup altered files, the system can
      be left in an unstable state if the patching process is interrupted by a
      power surge or outage.


Reading the Patch File from stdin (-g)
======================================

The patch file can be read from the standard input stream instead of the disk.
This is useful primarily if the patch file is transferred electronically to the
standard output stream on the user's system. To have PATCH read the patch file
from standard input, use the -getfromstdin switch on the command line, and do
not put a patch file name on the command line. If stdin is not redirected,
PATCH will indicate that it cannot find the patch file and will prompt the user
for its location. If stdin is redirected, but does not contain a patch file,
then PATCH will fail with an error.


Default Setting for PATCH
=========================

Default settings for PATCH are: NOBACKUP, NOIGNOREMISSING, MESSAGE, PATHSEARCH,
CONFIRM, TZCHECK, ALLOWSPLIT, and NOUNDO. Also the user level is set to
ADVANCED, and the screen output is produced in verbose mode.

All of these settings can be changed when the patch file is built; the PATCH
user may be able to change these settings, too, except for the user level. See
the discussion on the USERLEVEL command for more information about restricting
the PATCH user's options.


Applying Multiple Patch Files
=============================

PATCH can apply multiple patch files with a single invocation. The syntax is
slightly different than normal execution of PATCH. The following syntax
applies:

	patch * or,
	patch **

One asterisk has PATCH apply all patch files in the current directory. Two
asterisks has PATCH walk the subdirectories of the current directory and apply
any patch files it finds. If an update directory is specified on the command
line, that directory is used for all patch files. If no update directory is
given, the directory in which the patch file resides is used as the update
directory.


Ignoring Missing Files (-i)
===========================

Normally, PATCH considers the absence of a file which should be updated to be
an error condition. This may not always be desirable behavior. For example,
your end-users may not install the entire system; in this case, PATCH should
update whatever files are present.

To force PATCH to continue processing when files are missing, give the
-ignoremissing option on the command line or issue the IGNOREMISSING command
when the patch file is built.

Do this with caution since a partially updated system can result. RTPatch
cannot update what your users choose not to install. Ignoring missing files
allows you to update their system regardless of what they have installed;
missing files will cause a simple warning message.

If you cannot allow a partial upgrade, you should accept the default behavior
of RTPatch, which is to treat missing files as error conditions. If such a
condition arises, PATCH will quit with an error message. The user could then
install the missing files and rerun PATCH to continue with the upgrade.

The default behavior of PATCH can be restored either with the -noignoremissing
option when PATCH is run or with the NOIGNOREMISSING command when the patch
file is built.

These considerations only apply to files which will be modified (not deleted).
If a file which would be deleted by PATCH is missing, it is not an error
condition.

NOTE: PATCH can be instructed whether or not to ignore the absence of a
      particular file by using PATCHBLD's file grouping commands. See the
      'Specifying Individual File Processing Behavior' section of 'PATCHBLD
      Command Files' for more details.


Restoring the Old System on Error (-u)
======================================

If an error occurs during the patch application process, files that have been
patched prior to the error will remain patched. The -undo switch causes PATCH
to back out of any changes performed on the end-user's machine in the event of
error. Any files which have been patched will be restored to their original
form. Furthermore, if any changes have been made to the registry or INI files
with a registry script, then -undo will cause the registry and INI files to be
restored to their original states (with certain exceptions; see 'Updating the
Registry and INI Files' for details).

In order to undo patches, there must be room on the disk for backup copies of
all original files which will be altered. If there is insufficient room on the
disk for the -undo feature, PATCH will issue an error and exit.

The default behavior of PATCH can be restored either with the -noundo option
when PATCH is run or with the NOUNDO command when the patch file is built.

If the patching process is interrupted (for example, because of a power
failure), the state of the partially-updated system depends on whether or not
UNDO is activated. See the 'Rerunning PATCH' section for details.


Error Messages (-m)
===================

Whenever an error or warning condition occurs, PATCH will display an error or
warning message.

If you are spawning PATCH from your own updating program, you may want to
suppress the printing of any error messages. This is accomplished by giving the
-nomessage option on the command line or by issuing the NOMESSAGE command when
the patch file is built. -nomessage will also suppress the PATCH program
banner, while the PATCHBLD NOMESSAGE will not.

To restore the default behavior of PATCH, either give the -message option when
PATCH is run or issue the MESSAGE command when the patch file is built.

NOTE: PATCH can be instructed whether or not to print an error or warning
      message for a particular file by using PATCHBLD's file grouping commands.
      See the 'Specifying Individual File Processing Behavior' section of the
      'PATCHBLD Command Files' for more details.


Preventing the Application of Split Patch Files (-a)
====================================================

PATCH may be prevented from applying a patch file that is split across multiple
volumes. The reason for this is that if a patch file is inadvertently truncated
during electronic transmission, PATCH assumes that the patch file is split, and
asks for the next volume. The use of the option -noallowsplit causes PATCH to
terminate with an error if the patch file is truncated. If the user needs to
apply a patch that is in fact split across multiple floppies, the -allowsplit
option may be used.


Ignoring the Hour Component of a Timestamp (-t)
===============================================

When a file is moved from one machine to another across a time zone, when using
platforms that maintain file time as 'Greenwich Mean Time + Local Offset', it
will occasionally happen that the file's timestamp differs on one machine from
the same file's timestamp on the original by an integral number of hours. This
creates a problem when timestamp checking is enabled in a patch file, because a
patch for a file will not apply if the timestamp for the file is not the same
as the original timestamp at patch build time. The -notzcheck option causes
PATCH to ignore the hour component of a file's timestamp. In other words, two
files with timestamps that consist of the same date and number of minutes, but
a different number of hours, will be considered by PATCH to be the same if the
-notzcheck option is used.


Logging PATCH Errors to a File (-e)
===================================

The -errorfile option causes PATCH to log all error and warning messages to the
file PATCH.ERR. This file will be created in the update directory. If a run of
PATCH has no errors or warnings, no file will be created. This option is
helpful for tracking down problems at an end-user's site.

The -noerrorfile option prevents PATCH from logging errors to a file if error
logging has been turned on at PATCHBLD time.


Rerunning PATCH (-u)
====================

If the patching process is interrupted (for example, because of a power
outage), then the state of the system depends upon whether UNDO or NOUNDO was
specified when the patch file was built (or whether -undo or -noundo was
specified on PATCH's command line).

1. If UNDO was specified, the original system will be intact. This is because
   PATCH backs up the files to modify and then patches these backups. Once all
   of the patches have been applied, the patched files are copied onto the
   original files and then deleted.

2. If NOUNDO was specified, those files which were processed by PATCH will be
   updated, and the remaining files will be in their original state. This is
   because PATCH backs up a file, patches it, copies it onto the original, and
   deletes the backup. This process is performed one file at a time.

If PATCH is run again, any files which have already been patched will not be
touched, and only the old files will be processed.

If any changes have been made to the registry or INI files with a registry
script, then UNDO will also cause the registry and INI files to be restored to
their original states (with certain exceptions; see 'Updating the Registry and
INI Files' for details).


Patch Apply Errors and Warnings
===============================

Note: Patch Apply warning (wpt00xx) numbers are the same as Patch Apply
(ept00xx) numbers below.


error ept0001: Illegal Input Option '<Option>'
----------------------------------------------
The specified option is either an invalid option or the PATCH user does not
have the user level to allow the use of the option.


error ept0002: Insufficient Memory
----------------------------------
PATCH needs a certain amount of memory free for its internal tables. There was
insufficient memory available when PATCH was run.


error ept0003: Valid Password not entered. Patch File can not be applied
------------------------------------------------------------------------
The PATCH user did not enter the valid password for this patch file. Remember
that passwords are case sensitive.


error ept0004: Specified Update Directory '<DirName>' does not exist
--------------------------------------------------------------------
The PATCH user specified a directory to update but that directory does not
exist.


error ept0005: Specified [Update|Backup] Directory '<DirName>' is not a valid
	       directory.
-----------------------------------------------------------------------------
The user specified a directory name either for the Update or the Backup
directory that is not a valid directory name. An existing file with the same
name as the specified directory could cause this message.


error ept0006: Can Not Find Patch File '<FileName>'
---------------------------------------------------
PATCH was not able to locate the specified PATCH file.


error ept0007: Error Opening Patch File
---------------------------------------
PATCH was able to locate the patch file but could not open the file to read
from it. This could be a DOS error or a corrupted disk.


error ept0008: PATCH.EXE and Patch File incompatible - Need to update PATCH.EXE
-------------------------------------------------------------------------------
PATCH.EXE and the patch file are incompatible versions. PATCH.EXE can update
any old versions of patch files but not ones created with a newer version of
the data file format. You need to get a newer version of the PATCH program to
apply this patch.


error ept0009: Invalid Patch File '<Name>'
------------------------------------------
PATCH.EXE was unable to read correct information from the patch file. The
specified file is either not a patch file or has been corrupted. Get a new copy
of the file and rerun PATCH.


error ept0010: Failure Creating Backup Directory '<DirName>'
------------------------------------------------------------
PATCH was unable to create the specified Backup Directory.


error ept0011: Failure Creating Backup Log File '<FileName>'
------------------------------------------------------------
PATCH was unable to create the file containing information about what files
were backed up.


error ept0012: Failure Opening Backup Source File '<FileName>'
--------------------------------------------------------------
PATCH was unable to open the file to be backed up.


error ept0013: Failure Opening Backup Destination File '<FileName>'
-------------------------------------------------------------------
PATCH was unable to open the new file to copy the original file to.


error ept0014: Failure Writing Backup File '<FileName>'
-------------------------------------------------------
PATCH was unable to write the original file to the backup version.


error ept0015: Old File does not exist
--------------------------------------
PATCH needs bytes from the existing version of a file in order to build the new
file. However, it was unable to locate the old file.


error ept0016: New File already exists
--------------------------------------
There already exists a file by the same name as the new file being built. The
existing file will be copied to the backup directory if the BACKUP option is
on.


error ept0017: Failure Opening Old File: '<FileName>'
-----------------------------------------------------
PATCH was able to locate the old version of a file but the open failed. This is
probably caused by a DOS error. Try rerunning PATCH.


error ept0018: Failure Opening New File: '<FileName>'
-----------------------------------------------------
PATCH was unable to open the named file. It was attempting to open this file to
create a file for the updated version of the system. This can be caused by a
disk or network error or if a directory exists by the same name as the file
that PATCH is trying to open.


error ept0019: Failure Writing to File
--------------------------------------
An error occurred while PATCH was trying to write bytes to a new file.


error ept0020: Failure Reading from File
----------------------------------------
An error occurred while PATCH was trying to read bytes from an old file.


error ept0021: Failure Seeking to Position in File
--------------------------------------------------
PATCH was unable to seek to a position within a file. This is probably caused
by a DOS error or corrupted disk. Retry running the patch.


error ept0022: Failure Renaming File
------------------------------------
PATCH was unable to rename a file. This is probably caused by a DOS error or
corrupted disk. Try rerunning PATCH.


error ept0023: Patch for '<FileName>' not found in Patch File
-------------------------------------------------------------
PATCH was unable to find an entry in the patch file matching the entry name
specified by the user on the FILE option. Try using the LIST option to get a
list of the entries in the patch file.


error ept0024: New File already exists
--------------------------------------
The specified file has already been patched. PATCH does not need to patch this
file.


error ept0025: Verify of New File Failed. Possible Internal Error
-----------------------------------------------------------------
The file PATCH built is not valid. Users should never see this message.


error ept0026: Failure Creating Overflow File: '<FileName>'
-----------------------------------------------------------
PATCH was unable to open a file for its overflow information. This is probably
cause by a DOS error or by a full disk drive.


error ept0027: Overflow File Write Failure
------------------------------------------
PATCH was unable to read from the overflow table it created to hold data that
did not fit in its internal tables. This was probably caused by some sort of
DOS error or a corrupted disk or there was insufficient room on the disk for
the file.


error ept0028: Overflow File Read Failure
-----------------------------------------
PATCH was unable to read from the overflow table it created to hold data that
did not fit in its internal tables. This was probably caused by some sort of
DOS error or a corrupted disk.


error ept0029: Insufficient Disk Space to Apply Patch - You need at least
	       <Size> bytes free on drive <DriveLetter> for <Feature>.
-------------------------------------------------------------------------
PATCH needs at least the specified number of bytes to perform the patch
process. If UNDO or BACKUP is ON, PATCH needs room to backup all of the file
making up the original system and also the room needed to build the new system.
If both BACKUP and UNDO are OFF,PATCH only needs room to backup the biggest of
the files being patched.


error ept0030: Error opening serialization file '<FileName>'
------------------------------------------------------------
PATCH either could not find the serialization file or the open failed. If the
open failed, the probable cause is some kind of DOS error, retry the operation.


error ept0031: Error reading serialization file '<FileName>'
------------------------------------------------------------
PATCH cannot seek to the correct position in the serialization file or read the
correct number of bytes from the file. Possible causes are invalid positions
and lengths specified while running PATCHBLD.


error ept0032: Failure Setting File's Time/Date Stamp
-----------------------------------------------------
PATCH was unable to set the time/date stamp for the updated file or for a file
freshly backed up. This error should never occur but if it does would probably
be caused by some kind of disk failure or network file sharing problem.


error ept0033: Failure creating temporary file
----------------------------------------------
PATCH was unable to create a temporary file to hold the new file or to hold
overflow information. Try rerunning PATCH and if it still does not work reduce
the number of temporary files required by disabling BACKUP and UNDO.


error ept0034: Neither command line parameter specified is an existing
	       directory
----------------------------------------------------------------------
Multiple parameters were given on the PATCH command line that were neither
valid PATCH options or existing directories. If the user specifies multiple
parameters, at least one must be a valid existing update directory.


error ept0035: Only one file and one directory may be specified on command line
-------------------------------------------------------------------------------
The user specified more than one patch file and one update directory on the
PATCH command line.


error ept0036: Old file not found. However, a file of the same name was found.
	       No update done since file contents do not match.
------------------------------------------------------------------------------
PATCH was unable to locate an exact match for the original file to be updated.
However, PATCH was able to locate a file with the same name as the original
file. However, the file found did not have either the same size or checksum as
the actual original file that PATCH is seeking in order to perform the update.


error ept0037: Error opening error message file
-----------------------------------------------
PATCH was unable to open the file PATCH.ERR for storing error messages. The
probable cause is some kind of DOS error, retry the operation or specify the
NOERRORFILE option on the PATCH command line.


error ept0038: Failure Renaming/Deleting file '<FileName>'
----------------------------------------------------------
This error is usually caused by a write permission error. This file may be
locked or in use.


error ept0039: Patch File '<FileName>' was built for the wrong platform
-----------------------------------------------------------------------
A patch file build for another platform can not be applied with the Windows
patch apply program, and vice versa.


error ept0039 - ept0043:
------------------------
Reserved.


error ept0044: Registry/INI patching not supported under DOS - directives
	       ignored
-------------------------------------------------------------------------
Your patch file contains registry modification instructions. Since DOS does not
contain a registry, these directives will be ignored.


error ept0045: Missing or Invalid Registry/INI entry
----------------------------------------------------
Your patch file contains a registry key that Patch Apply will use to locate the
proper update directory. This error will occur If the registry value can not be
found or if the entry points to a non-existent directory.


error ept0046: Error updating MSI database
------------------------------------------
The MSI database identified in the MSIDATABASE command could not be properly
updated with the patch file. The text of the error message contains a more
detailed explanation.


warning ept0047: Msi Support only available in 32-bit Windows patching -
		 directives ignored.
------------------------------------------------------------------------
Only the 32-bit Windows apply options can use the MSI options at apply time. If
you apply an MSI-enabled patych with a DOS or Win16 apply option (e.g.,
PATCHDOS.EXE, PATCHW.DLL, etc.), you will receive this warning.


error ept0048: PATCH Terminated by Custom Action
------------------------------------------------
A DOAFTER, DOAFTERALL, DOBEFORE, DOBEFOREALL has been executed with the ?
syntax, and the custom hook has returned non-zero, instructing RTPatch to abort
the patch. See Controlling Patching with Execution Hooks.


error ept0049: This RTPatch upgrade requires Administrative rights. Please
	       rerun with the 'Run as administrator' option
--------------------------------------------------------------------------
On Windows Vista, the patch file required admin rights, but was not run with
admin privileges.


error ept0050:
--------------
Reserved.


error ept0051: Evaluation and non-evaluation RTPatch are not compatible
-----------------------------------------------------------------------
RTPatch evaluation software creates a different format patch file that is not
compatible with non-evaluation versions (licensed copies) of RTPatch. If you
are testing RTPatch for upgrade purposes, you will need to rebuild your old
patches in order to apply them with the evaluation version of RTPatch. Note:
RTPatch is always backward compatible - failure of the evaluation version of
RTPatch to apply patch files created with older RTPatch licensed Build engines,
should not be construed to indicate that backward compatibility is lacking.
