***************************************************
*       Instructions for using bootusc.exe        *
*               Version 2.0.4                     *
*               August/29/2002                    *
***************************************************

===========
0. Contents
===========
 1. Overview
 2. Installation
 3. INI file for bootusc.exe
    3.1 Trace
    3.2 Backup
    3.3 Boot-US password
    3.4 Warnings
 4. Online help for bootusc.exe
 5. Sector operations
    5.1 Save/restore track 0
    5.2 Save/restore arbitrary sectors
    5.3 Save/restore partition and boot sectors
 6. Partition operations
    6.1 Hide partitions
    6.2 Unhide partitions
    6.3 Activate partitions
    6.4 Deactivate partitions
 7. Repair MBR
 8. Boot manager operations
 	8.1 Install boot manager
    	8.1.1 Contents of bmgrus.ini
        8.1.2 Keywords in section [GLOBAL]
        8.1.3 Keywords in section [ENTRY_<n>]   
	8.2 Uninstall boot manager
	8.3 Show status about installed boot manager
	8.4 Update boot manager
 9. Report about partitions
10. Encrypt password
11. Reboot the computer
12. Return codes


===========
1. Overview
===========
The command line program 'bootusc.exe' exists in two versions,
a DOS version and a WIN32 version. The DOS version can be 
executed only under DOS (or in DOS mode), the WIN32 version 
can be executed in a command line window under any 32-bit Windows version
(Windows 95/98/ME/NT/2000/XP). 

The language of the command line program ist fixed to either german 
or english. Contrary to the GUI version of Boot-US the language 
of the command line program cannot be switched.

The WIN32 version is intended for companies with a large number
of PCs. Almost all functions in the WIN32 version require a 
20 user license (or higher). Only the report function does not 
require a license.
The DOS version is intended for private usage. It is subject
to the same license requirements and restrictions as the GUI
version of Boot-US. For example, the installation of the 
boot manager to diskette does not require a license, while the
installation to disk is available only in the licensed version.

Starting with version 1.6.3 the command line version supports
the same set of operations as the GUI version of the 
configurations program Boot-US. 


===============
2. Installation
===============
The command line version of Boot-US is distributed as a standard ZIP file.
This ZIP file contains both the DOS and the Win32 version of the command
line program. The ZIP file could be un-zipped in any Windows shell. 
After un-zipping you should have the following files in the unzip 
directory:

    readme.txt        - this readme file
    bootusc.ini       - sample INI file for bootusc.exe
    bmgrus.ini        - sample setup data for boot manager
    dos\bootusc.exe   - the command line program for DOS
    win32\bootusc.exe - the command line program for Win32
    win32\disk16.dll  - only necessary for Windows 95/98/ME
    win32\disk32.dll  - only necessary for Windows 95/98/ME

The DOS resp. Win32 version of 'bootusc.exe' is contained in the 
subdirectory dos resp. win32. 
The sample ini files for the DOS and WIN32 version are identical.

It is recommended to install the DOS version of 'bootusc.exe' to a 
bootable DOS diskette so that you can access the program 'bootusc.exe' 
also in case of problems.

===========================
3. INI file for bootusc.exe
===========================
The INI file for the command line version 'bootusc.exe' has 
the name 'bootusc.ini' and must reside in the same directory as 
the executable 'bootusc.exe'. 
The package contains an example INI file.

By default the command line program does not require an INI file.
The INI file is necessary only for specific tasks. 

The format of the INI file is identical to the Windows standard format
of INI files, i.e. there are sections with keywords. All section names
are different and within a section all keywords are different.
However the same keyword may appear in different sections.

---------
3.1 Trace
---------
The tracing of the program 'bootusc.exe' can be enabled in the INI file. 
The following example shows the corresponding entries in the INI file:

[TRACE]
trace=1                         # default: 0
tracefile=bootusc.trc           # default: bootusc.trc

By default tracing is disabled. 

In the example above the tracing is enabled. The trace is written
to the default trace file 'bootusc.trc' resp. the specified trace file.

----------
3.2 Backup
----------
Starting with version 1.5.4 an automatic backup of partition and boot
sectors can be enabled before the boot manager is installed.
This backup allows an easy restore of the previous contents of 
all partition and boot sectors. 

The following example shows the corresponding entries in the INI file:

[BACKUP]
NumFiles=20                     # Default: 0
Directory=C:\temp\backup        # directory to store the backup files 
LastFile=1                      # do not manually edit the parameter 'LastFile'
                                # it is automatically incremented by bootusc.exe

By default the backup of partition and boot sectors is disabled. 
In order to enable the automatic backup the parameter 'NumFiles' must 
be set to a positive value, for example 'NumFiles=20'.

When the backup is enabled, the partition and boot sectors 
from all disks are saved before the boot manager is installed. 
The backup file is created in the specified directory. The file name 
is 'auto<nn>.sec', where <nn> is a number between 1 and 'NumFiles'. 
The file number <nn> is automatically incremented before each backup. 
It is reset to 1 when the maximum number 'NumFiles' is exceeded.

The parameter 'LastFile=<nn>' stores the number <nn> used in the 
last backup operation. The value of this parameter is automatically 
incremented. This parameter should not be manually modified by the user.

--------------------
3.3 Boot-US password
--------------------
Starting with version 1.5.4 the execution of the command line or GUI
version of Boot-US is protected by the Boot-US password. Both programs
are protected by the same password. When a password is specified 
you must provide this password before you can use the respective program.

Typically the Boot-US password should be stored within the boot manager.
This Boot-US password is then required to run the GUI or command line
version of Boot-US as long as the boot manager is installed.

The following example shows the corresponding entries in the INI file:

[PASSWORD]
Password=<xxx>              # encrypted Boot-US password
                            # default: no password

The keyword 'Password' specifies the Boot-US password. 
It is necessary to specify the Boot-US password in encrypted form. 
When the Boot-US password has been stored in the boot manager,
the GUI and command line versions of Boot-US require this password upon 
start-up. The password is either read from the INI file or it must be entered
interactively.

Specifying a password in the INI file is necessary for batch processing.
In this case it should not be necessary to enter a password interactively. 

------------
3.4 Warnings
------------
Starting with version 1.6.2 many integrity checks of the partitions
are performed. As a result of these checks error and warning messages
could be created and displayed with the corresponding partition. 

In general error messages indicate a severe problem. Error messages
should not be ignored. Error messages canot be suppressed.

On the other hand warning messages typically indicate "only" a violation
of established standards. In many cases these warnings can be ignored. 
Typical examples of warning messages are the violation of the cylinder
boundary rule or non-standard CHS values in the partition table 
when the partition exceeds the 8 GB limit. 

The warnings can be suppressed by the following INI parameter:

[STARTUP]
ShowWarnings = 0             # default: 1

When 'ShowWarnings' is set to 0 (null) no warnings are displayed.


==============================
4. Online help for bootusc.exe
==============================
The command line program 'bootusc.exe' contains a short online help for
all supported commands. This help is invoked by

    bootusc help

You can get extended online help for a specific command <cmd> by

    bootusc help <cmd>

When a command <cmd> has different variants <subcmd> you get the 
online help by

    bootusc help <cmd> <subcmd>


====================
5. Sector operations
====================
----------------------------
5.1 Save and restore track 0
----------------------------
In the GUI version of Boot-US you can save the complete track 0
to a file 'track0.bin'. This file could be written back directly to 
the disk sectors also by the command line program 'bootusc.exe'.

The following command saves the complete track 0 of the first
boot disk to a file:

    bootusc save track0 [file=<filename>]
    
The following command restores the track 0 of the first boot disk 
from a file:

    bootusc restore track0 [file=<filename>]

The default file name is 'track0.bin' in the current directory. 
This file is used when no file name is specified. 

--------------------------------------
5.2 Save and restore arbitrary sectors
--------------------------------------
The commands for saving (save) and restoring (restore) arbitrary
sectors are:

    bootusc save sector {chs=x/x/x | lba=x} [num=N] [drive=d] file=<filename>
    bootusc restore sector {chs=x/x/x | lba=x} [num=N] [drive=d] file=<filename>

It is necessary to specify the sector(s) to be saved or restored in 
the CHS or LBA format. Additionally the file name must be specified 
where the sector data are to be stored or restored from.

By default the command for saving or restoring of sectors refers only
to a single sector on the first disk. If required the command can be
extended to multiple sectors by the option 'num'. Additionally the 
option 'drive' allows to access sectors on other disks.

The file where the binary sector data are stored contains only
the plain sector data. This file does not contain any position 
information. Additionally to using Boot-US for restoring the file
to disk by any disk editor can be used as well.

-----------------------------------------------
5.3 Save and restore partition and boot sectors
-----------------------------------------------
The commands for saving (save) and restoring (restore) all partition 
and boot sectors on all disks into resp. from a single file are:

    bootusc save partsec file=<filename>
    bootusc restore partsec file=<filename>

It is necessary to specify the file name where the sector data are 
to be stored or restored from. This target file contains the binary
sector data together with disk positition information for each data
block. Due to the aditional sector data only Boot-US can be used for
restoring the file to disk.


=======================
6. Partition operations
=======================
------------------
6. Hide partitions
------------------
The command for hiding a partition is:

    bootusc partion hide {label=<label> | partnr=<n> | entry=<e>}
                         [true] [drive=d] [batch]

The partition to be hid must be identified either by the volume label, 
the partition number or the partition table entry. These informations
are displayed by the report function.
When no drive is specified disk 1 is assumed. 

---------------------
6.2 Unhide partitions
---------------------
The command for unhiding partitions is:

    bootusc partition unhide [drive=d] 

The unhiding of partitions is carried out for all partitions on the first 
resp. on the specified disk. This is the only modification in the 
partition table of the MBR of the respective disk. 
The boot loader code in the MBR remains unchanged completely. 

Starting with bootusc 1.5.0 true hidden partitions are also unhid
by this command. In order to unhide a true hidden partition the boot 
sector of the respective partition must be reset to the previous state.

When you have activated the automatic hiding of C: partitions 
(or the individual hiding of partitions) during the installation of 
the boot manager of Boot-US, on every boot process all primary (and logical)
non-selected partitions (or the specified partitions) will be hid. 
This happens also when you have performed a test installation of 
the boot manager on a diskette. 
There are configurations where several partitions are involved 
in a successful boot process. When one of this partitions is hidden, 
the boot process may fail. This boot problem can be easily solved by 
unhiding all partitions.

-----------------------
6.3 Activate partitions
-----------------------
The command for activating a partition is:

    bootusc partition activate {label=<label> | partnr=<n> | entry=<e>}
                               [drive=d] [batch]

Only primary partitions can be activated. Partitions must be 
activated individually, i.e. the respective partition must be specified
either by the volume label, the partition number or the partition table entry.
All these informations are displayed by the report function.
When a certain partition is activated all other primary partitions on the
same disk are deactivated automatically.

-------------------------
6.4 Deactivate partitions
-------------------------
The command for deactivating all partition on a certain disk is:

    bootusc partition deactivate [drive=d] [batch]

This deactivates all partitions on the specified disk. No partition
remains active on this disk. 

A configuration where no partition is active will cause problems
when trying to boot without boot manager, since the MBR code expects
to find exactly one active primary partition. If no active
partition is found, the MBR code stops the boot process and displays
an error message.

This command was requested by a customer in order to avoid some problem
with the assignment of drive letters. This command might not be useful
for other customers.


=============
7. Repair MBR
=============
In order to remove a boot manager which is installed in the MBR, 
a standard boot loader must be written to the MBR. By the command

    bootusc repair_mbr [file=<filename>]

the boot loader code in the MBR is replaced. The partition table
remains unchanged essentially. The only modification of the partition
table is that the first primary partition is activated if none is 
active.

When no file name is specified a standard boot loader is written 
in the MBR. This standard boot loader searches the partition table
for an active partition and starts the boot sector of that partition.
When a file is specified the boot loader is extracted from this file
and written to the MBR.


==========================
8. Boot manager operations
==========================
------------------------
8.1 Install boot manager
------------------------
The command for installing the boot manager of Boot-US is:

    bootusc bootmanager install [file=<filename>] [batch]
    
The parameters of the boot manager are read from a separate configuration 
file specified by the parameter 'file'. The default configuration file is 
called 'bmgrus.ini' residing in the same directory as 'bootusc.exe'.

When 'batch' is specified the user is not prompted. All questions 
are assumed to be answered by 'yes'.

8.1.1 Contents of bmgrus.ini

The configuration file 'bmgrus.ini' contains a global section [GLOBAL] 
and separate sections [ENTRY_<n>] (<n> = 1..N) for every entry in the 
boot manager.

The sections must be specified in upper case.
The keywords can be specified in any case.
<nn>  denotes an integer.
<xxx> denotes an string.

8.1.2 Keywords in section [GLOBAL]

INSTALL_TARGET = PRIMARY | MBR | DISKETTE   
                                    # Install target of boot manager.
                                    # Default is PRIMARY.
                                    
STARTUP_DELAY = <nn>                # Startup delay in sec.
                                    # Default is 0 (sec).
                                    
AVAILABLE_TIME = <nn> | UNLIMITED   # Time available for selecting another partition.
                                    # Default is 30 (sec).
                                    
SELECT_LAST_BOOT = YES | NO         # Should the top partition or the last booted 
                                    # partition be selected ?
                                    # Default is NO (top partition is selected).

SIMPLE_CFG_MENU = YES | NO          # Should only the simple commands in the 
									# configuration menu be displayed ?
                                    # Default is NO (show all commands).
									# When YES is specified the two commands
									# "Unhide all partitions" and 
									# "Restore MBR and uninstall boot manager"
									# are not shown.

ENCRYPT_PASSWORDS = YES | NO        # Specified whether all passwords specified 
                                    # in this configuration file are encrypted
                                    # or plain text.
                                    # Default is NO meaning passwords are not encrypted.

BOOTUS_PASSWORD = <xxx>             # Admin password of configuration program Boot-US
                                    # (encrpyted or plain text).
                                    # The specified password is stored in the boot manager.
                                    # It protects the command line and GUI version of Boot-US.
                                    # Accepted only in licensed version.
                                    # Default is empty string.

BMGRUS_PASSWORD = <xxx>             # Admin password of boot manager (encrpyted or plain text).
                                    # The specified password protects the configuration menu 
                                    # of the boot manager.
                                    # Accepted only in licensed version.
                                    # Default is empty string.

HIDE_METHOD = NO_CHANGE | PRI | PRILOG | SELECT | PRI_TRUE | PRILOG_TRUE | SELECT_TRUE
                                    # Specifies the method for hiding partitions.
                                    # Starting with version 1.7.0 it is possible to
                                    # specify an individual hiding of partitions
									# (keywords SELECT or SELECT_TRUE)
                                    # Default is NO_CHANGE.
									#
									# PRI resp. PRI_TRUE will hide primary partitions 
									# automatically. Logical partitions remain unchanged.
									# PRILOG and PRILOG_TRUE will hide primary and 
									# logical partitions automatically.
									#
									# Remark:
									# The previous values AUTO and AUTO_TRUE 
									# are still recognized.

                                    
8.1.2 Keywords in section [ENTRY_<n>]

NAME = <name>                       # Specifies the partition name (11 ch.).
                                    # Default is empty string.

DESCRIPTION = <descr>               # Specifies the partition description (33 ch.).
                                    # Default is empty string.
 
PASSWORD = <xxx>                    # Password for partition (encrypted or plain text).
                                    # Accepted only in licensed version.
                                    # Default is empty string.
                    
DRIVE = <xxx>                       # Specifies the drive where the partition resides.
                                    # Allowed values are (1...N) or A.
                                    # There is no default, the keyword is mandatory.
                                    # The value A means booting from diskette A:. 
                                    # The values 1...N mean disk 1...N.
                                    
                                    # The following keywords offer five different
                                    # possibilities for specifying the partitions 
                                    # to be included in the boot manager.
                                    #
LABEL = <xxx>                       # - The keyword LABEL identifies the partition
                                    #   by the volume label.
PARTNR = <nn>                       # - The keyword PARTNR identifies the partition
                                    #   by the partition number (see report).
PTABLE = <nn>                       # - The keyword PTABLE identifies the partition
                                    #   by its partition table entry (0..3)
									#   Usage if the keyword PTABLE is not recommended.
LBA = <nn>                          # - The keyword LBA identifies the partition 
                                    #   by its LBA start sector (0..N).
POSITION = <nn> MB | GB             # - The keyword POSITION identifies the partition
                                    #   by its disk position. The specified position 
                                    #   must lie somewhere inside the partition.
                                    # Remark: One of the keywords LABEL, PARTNR,
                                    #         PTABLE, LBA or POSITION is mandatory for
                                    #         identifying the desired partition
                                    #         when booting from a disk. 
                                    # Remark: When booting from diskette A: the five 
                                    #         keywords LABEL, PARTNR, PTABLE, LBA and 
                                    #         POSITION are ignored.
                                    # Remark: 1 MB = 1024 * 1024 Byte
                                    #         1 GB = 1024 * 1024 * 1024 Byte

#
# The following keywords are used for hiding individual partitions. 
# They are only allowed when HIDE_METHOD is set to SELECT or SELECT_TRUE.
#
# The keywords for specifying the partition to be hid are similar to
# the keywords specifying the partitions to be booted.
# Only the prefix HIDEPART_<n>_ is added (see below),
# where <n> is a number between 1 and N (see below). 
#
# Example: 
# In order to hide three partitions selectively you would
# specify the prefixes HIDEPART_1_, HIDEPART_2_ and HIDEPART_3_.
#

HIDEPART_<n>_DRIVE = <xxx>			# The drive of the partition to be hid.

HIDEPART_<n>_LABEL = <xxx>			# One of these four keywords must be used
HIDEPART_<n>_PARTNR = <nn>			# in order to specify the partition to be hid.
HIDEPART_<n>_LBA = <nn>					
HIDEPART_<n>_POSITION = <nn> MB|GB	

--------------------------
8.2 Uninstall boot manager
--------------------------
The command for uninstalling the boot manager of Boot-US is:

    bootusc bootmanager remove [batch]
    
During this operation the MBR code is replaced by the previous MBR code. 
In case the boot manager is installed in a primary partition this partition
is deleted. The former active partition is re-activated. If necessary the 
first partition is set active.

When 'batch' is specified the user is not prompted. All questions 
are assumed to be answered by 'yes'.

--------------------------------------------
8.3 Show status about installed boot manager
--------------------------------------------
The command for displaying status information about an installed 
boot manager is:

    bootusc bootmanager status 

When the boot manager is not installed the error code 4 is returned.

-----------------------
8.4 Update boot manager
-----------------------
The command for updating the name and/or description of a certain entry <n>
(see status command) in an installed boot manager is:

    bootusc bootmanager update entry=n [name=<name>] [descr=<descr>] [batch]

When 'batch' is specified the user is not prompted. All questions 
are assumed to be answered by 'yes'.


==========================
9. Report about partitions
==========================
A report about all partitions on all disks can be displayed by the command:

    bootusc report [file=<filename>]

By default the report is displayed in the console windows.
In order to save the report in a file, you need to specify a file name.

The report command does not require a license. 


=====================
10. Encrypt passwords
=====================
The following command allows you to lookup the encrypted form of a password:

    bootusc encrypt_pw <password>

The string <password> contains the plain text password. The command displays
the password in encrypted form. The opposite is not supported, i.e. there is 
no command provided which allows to lookup the plain text password from an 
encrypted password.

This command is available only with a license.


=======================
11. Reboot the computer
=======================
The following command allows you to reboot the PC:

    bootusc reboot [batch]

When 'batch' is specified the user is not prompted for confirmation.


===============
12. Returncodes
===============
0 = Command executed successfully
1 = Syntax error or invalid parameters specified (command was not executed)
2 = Command aborted by user
3 = Error during execution of command
4 = Boot manager is not installed (for command bootmanager status)
