@echo off
set id=A:
if "%2" == "" goto blank
set id=%2
:blank
if "%1" == "" goto error
if "%1" == "CADKEY" goto cadkey
if "%1" == "cadkey" goto cadkey
if "%1" == "DATACAD" goto cadkey
if "%1" == "datacad" goto cadkey
if "%1" == "VERSACAD" goto versacad
if "%1" == "versacad" goto versacad
if "%1" == "CADVANCE" goto cadvance
if "%1" == "cadvance" goto cadvance
if "%1" == "USTATION" goto ustation
if "%1" == "ustation" goto ustation
if "%1" == "GENERIC" goto generic
if "%1" == "generic" goto generic

:error
echo off
echo .
echo . Illegal setup command.
:usage
echo off
echo .
echo . Command format for setup is:
echo .
echo .        A:\SETUP [package] [drive]
echo .
echo . where [package] is:
echo .
echo .        CADKEY for CadKey or DataCad,
echo .        VERSACAD for VersaCad,
echo .        CADVANCE for Cadvance,
echo .        USTATION for MicroStation.
echo .        GENERIC for Generic CADD.
echo .
echo . The [drive] is optional and A: will be assumed, or you can
echo . supply B: as the setup source drive.
echo .
echo . Note: Your current drive must be the drive containing the package
echo .       you are attempting to install.
echo . If the problems still exist please call our tech support.

goto exit

:cadkey
set ip=\cadkey\
goto install

:versacad
set ip=\versacad\
goto install

:cadvance
set ip=\cadvance\
goto install

:ustation
set ip=\ustation\
goto install

:generic
set ip=\generic\
goto install

:install
%id%%ip%install
:exit
