23
Peripheral Sharer
6.2 SMARTCON.EXE
SMARTCON is a Windows program
that performs a similar function to
the DOS program SMART.EXE
described in the previous section.
To install SMARTCON insert the
Peripheral Sharer disk in drive A
and select Run from the Program
Manager’s File menu. Run the file
A:\SETUP.EXE and follow the
instructions in the installation
menus.
The installation program will
create a SMARTCON icon in the
Peripheral Sharer group on your
Windows desktop. Double click on
the SMARTCON icon to establish
an exclusive connection to the
Peripheral Sharer. Click on the
Disconnect button to break the
exclusive connection and return
the Peripheral Sharer to auto-scan
mode.
6.1.4 U
SING
SMART W
ITHIN
B
ATCH
F
ILES
SMART can be used within DOS
batch files to make a connection,
run an application and then break
the connection when the user quits.
This is equivalent to using SMART to
run a program (
Section 6.1.1
) but
has the advantage that less memory
is needed. The SMART program
returns error level 1 if it has failed
to make a connection. This property
can be used within your DOS batch
file to quit if the connection attempt
has failed. A typical batch file is
shown below.
SMART ON LPT1
IF ERRORLEVEL 1 GOTO
TERMINATE
EXAMPLE.EXE
SMART OFF LPT1
:TERMINATE
For a detailed example refer to
Section 5.1.1
. A small number of
programs, such as Remote Control
Panel from Hewlett-Packard, may
terminate batch files when they are
run. Consequently, they cannot be
used in the mode described above.
Use the method described in
Section
6.1.1
instead.