@echo off
cls
echo ---------------  register.bat for Windows NT 3.x---------------------
echo This device driver installation copies the CRYPTO-BOX device drivers 
echo for Windows NT to your system directory and updates the registry. 
echo From then on you can access the CRYPTO-BOX from within both, 16-bit 
echo AND 32-bit applications.
echo ---------------------------------------------------------------------

if "%1" == "" goto USAGE
if "%SystemRoot%" == "" goto ERROR
if "%1" == "a" goto all
if "%1" == "A" goto all
if "%1" == "i" goto all

goto OK

:USAGE
echo Usage:         register [PortNumber]
echo PortNumber:    a - for all ports (recommended)
echo                1 - for port number 1  (monochrome card port)
echo                2 - for port number 2  (usually LPT port 1)
echo                3 - for port number 3  (usually LPT port 2)
echo Example:       register a
echo ---------------------------------------------------------------------
echo     You can *start* and *stop* the CRYPTO-BOX device drivers      
echo     via "Control Panel\Devices" in the "Main" group.              
echo ---------------------------------------------------------------------
goto END


:OK
echo.
echo Copying driver to NT system directory:
echo.
copy marxdev%1.sys %SystemRoot%\system32\drivers\marxdev%1.sys
echo.
echo Registering driver to NT system:
echo.
regini marxdev%1.ini
echo.
echo Copying the virtual device driver "cbnvdd.dll" to the NT system 
echo directory to support 16-bit calls to the 32-bit device driver.
echo.
copy cbnvdd.dll %SystemRoot%\system32\*.*
echo.
echo Please reboot your system for device driver settings to take effect.
echo.
goto end

:all
echo Copying all drivers to NT system directory:
echo.
copy marxdev1.sys %SystemRoot%\system32\drivers\marxdev1.sys
copy marxdev2.sys %SystemRoot%\system32\drivers\marxdev2.sys
copy marxdev3.sys %SystemRoot%\system32\drivers\marxdev3.sys
echo.
echo Registering all drivers to NT system
echo.
regini marxdev1.ini
echo.
regini marxdev2.ini
echo.
regini marxdev3.ini
echo.
echo Copying the virtual device driver "cbnvdd.dll" to the NT system 
echo directory to support 16-bit calls to the 32-bit device driver.
echo.
copy cbnvdd.dll %SystemRoot%\system32\*.*
echo.
goto END

:ERROR
echo ERROR: Are you running Windows NT?
echo        The expected SystemRoot-environment variable is not set!
goto END

:USAGE
echo.
echo Usage:         marxinst [PortNumber]
echo PortNumber:    1 - for port number 1  (monochrome card port)
echo                2 - for port number 2  (usually LPT port 1)
echo                3 - for port number 3  (usually LPT port 2)
echo                a - for all ports (recommended)
echo.
echo Example:       MARXINST a
echo.

:END
echo ----------------- (c) Copyright Marx International, Inc 1996 --------
echo last update: July 17, 1996
echo Email: support@marx.com
echo Phone: (+1) 404 321-3020 or 1-800-MARX-INT (USA)
pause