@echo off
echo VersaCAD 386/VersaCAD 7.0 Driver Installation
if %1x == x goto usage
if %2x == x goto usage
if %3x == 386x goto do386
if %3x == 70x goto do70
goto usage
:do386
if not exist %1\lzcopy.exe goto insertdisk
%1\lzcopy.exe %1\versacad\vc3_911.co_ %2\vc3_911.com
if errorlevel 1 goto error
%1\lzcopy.exe %1\versacad\remove.ex_ %2\remove.exe
if errorlevel 1 goto error
%1\lzcopy.exe %1\versacad\vcad386.cf_ %2\enviro.cfg
if errorlevel 1 goto error
%1\lzcopy.exe %1\versacad\vcad386.ba_ %2\vcad386.bat
if errorlevel 1 goto error
if exist %2\enviro.exe goto setup1
if exist %2\enviro.com goto setup1
if exist %2\enviro.bat goto setup1
goto errorsetup
:setup1
%2\enviro
goto theend
:do70
if not exist %1\lzcopy.exe goto insertdisk
%1\lzcopy.exe %1\versacad\vc2_911.co_ %2\vc2_911.com
if errorlevel 1 goto error
%1\lzcopy.exe %1\versacad\remove.ex_ %2\remove.exe
if errorlevel 1 goto error
%1\lzcopy.exe %1\versacad\vcad386.cf_ %2\enviro.cfg
if errorlevel 1 goto error
%1\lzcopy.exe %1\versacad\vcad70.ba_ %2\vcad70.bat
if errorlevel 1 goto error
if exist %2\enviro.exe goto setup2
if exist %2\enviro.com goto setup2
if exist %2\enviro.bat goto setup2
goto errorsetup
:setup2
%2\enviro
goto theend
:errorsetup
echo Cannot configure VersaCAD
goto theend
:insertdisk
echo Please insert the Utilities and Drivers Diskette
goto usage
:usage2
echo Cannot find VersaCAD in the directory %2
:usage
echo [Usage]: INSTALL [Source Drive:] [Target Directory] [386 or 70]
:error
:theend
