@echo off
cls

REM Checkimg for proper command line usage.
if "%1" == "" goto usage

REM Checking for existing directory.
if not exist %1\civnet.exe goto usage2

REM Checking for Proper Drive
if not exist civnet12.exe goto usage3

REM Prep Installation Directory
attrib -r %1\*.* /s

REM Installing UPDATE Software
civnet12 -o %1

Rem Checking for errors
if errorlevel 1 goto error1

goto end

:usage
cls
echo You must supply the DRIVE and DIRECTORY where CIVNET is
echo located.   EXAMPLE:  INSTALL C:\MPS\CIVNET
goto EOF

:usage2
cls
echo Unable to Locate CIVNET in the %1 directory.  Please
echo double check the directory and try again.
goto EOF

:usage3
cls
echo This install must be run from the same DRIVE/DIRECTORY that the 
echo CIVNET UPDATE files are located in.  Please change to that
echo DRIVE/DIRECTORY and run INSTALL again.
goto EOF

:error1
cls
echo An Error has occured while unzipping the software, you may have
echo a bad copy.  Please try the install again, if it fails then get
echo another copy of this update.
goto EOF

:end
echo Installation Complete!
echo ÿ

:EOF

