ECHO OFF
CLS
REM  Installs VC5 shareware edition.
IF NOT "%1"=="" GOTO %1

IF NOT EXIST GET.COM IF NOT EXIST GET GOTO GETERROR
IF EXIST GET COPY GET GET.COM > NUL
ECHO ÿ
ECHO      Checking the system...
SET X=123456789012345678901234567890
IF NOT "%X%"=="123456789012345678901234567890" GOTO ENVERROR
SET X=
GET !J
IF ERRORLEVEL 209 GOTO GOTVIRUS
IF ERRORLEVEL 0 IF NOT ERRORLEVEL 3 ECHO  You must have DOS 3.0 or above.
IF ERRORLEVEL 0 IF NOT ERRORLEVEL 3 GOTO VERYEND
GET !D
SET DR=%GET%
GET !P
SET DI=%GET%
IF "\"=="%DI%" ECHO DO NOT put VC in the root directory.
IF "\"=="%DI%" GOTO VERYEND
CLS
ECHO ÿ
ECHO      Checking the system...
ECHO      System seems clean...
ECHO ÿ
ECHO   Thank you for trying the Victor Charlie Shareware Edition.
ECHO   VC is the world's first GENERIC anti-virus program.
ECHO   You may evaluate this program for 30 days without obligation.
ECHO ÿ
ECHO   Installing and initializing VC is the most important step.
ECHO   After this process, VC5 should function well for you.
ECHO ÿ

ECHO   %0 assumes you want VC's Home Directory to be %DR%:%DI%
ECHO   If this is incorrect, please stop %0 now. Move the
ECHO   VC files and %0.BAT to the intended Home Directory and
ECHO   start again from your preferred location.
ECHO ÿ
ECHO   Do you want to install VC in %DR%:%DI%?
ECHO ÿ
GET ÿÿPress [Esc] to stop now. Any other key to continue.

IF ERRORLEVEL 28 GOTO LOOKSOK
IF ERRORLEVEL 27 ECHO   Returning to DOS....
IF ERRORLEVEL 27 GOTO VERYEND

:LOOKSOK
CLS
ECHO ÿ
ECHO    Now backing up your Autoexec.BAT in the VC Home Directory.
COPY C:\AUTOEXEC.BAT AUTOEXEC.VC5 > NUL
IF NOT EXIST AUTOEXEC.VC5 GOTO AUTOERR
ECHO ÿ
:AUTOMSG
ECHO ÿ
ECHO    Your current Autoexec.BAT has been backed up!
ECHO    In the event of any error, AUTOEXEC.VC5 is a record of your
ECHO    original Autoexec.BAT before you started %0.
ECHO    We will not erase this file at any time. However:
ECHO    PLEASE NOTE THE FOLLOWING:
ECHO    If you run %0 more than one time, it is barely  
ECHO    possible that this backup will be over-written by a 
ECHO    "bad" copy of Autoexec.BAT.
ECHO ÿ
ECHO                ßßßßßßßßßßßßßßßßßßßßßßßß
ECHO    IF YOU STOP %0 FOR ANY REASON, BE SURE TO RESTORE YOUR
ECHO    ORIGINAL AUTOEXEC.BAT FILE BEFORE YOU TRY AGAIN.
ECHO    You can do this with one simple command at any point:
ECHO                COPY AUTOEXEC.VC5 C:\
ECHO                ÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ
ECHO ÿ
GET ÿÿÿÿPlease press the = F9 = key to acknowledge this warning:
ECHO ÿ
IF NOT ERRORLEVEL 10 IF ERRORLEVEL 9 GOTO GOTMSG
IF NOT ERRORLEVEL 0 GOTO GOTMSG

CLS
GOTO AUTOMSG
:GOTMSG

CLS
ECHO   In a moment, %0 will reboot this computer.
ECHO   Making a temporary Autoexec.BAT for that step...
ECHO ÿ
ECHO @ECHO OFF > AUTOBAT
ECHO %DR%: >> AUTOBAT
ECHO CD %DI% >> AUTOBAT
ECHO %0 AFTERBOOT >> AUTOBAT

ECHO ECHO OFF > AUTOEXEC.!!!
ECHO CLS >> AUTOEXEC.!!!
ECHO %DR%: >> AUTOEXEC.!!!
ECHO CD %DI% >> AUTOEXEC.!!!
ECHO CALL VCSTART >> AUTOEXEC.!!!
GET !! ;%DR%:%DI%
ECHO ECHO OFF > VRESCUE
ECHO %DR% >> VRESCUE
ECHO CD \ >> VRESCUE
ECHO CD %DI% >> VRESCUE
ECHO VC >> VRESCUE
COPY AUTOEXEC.!!!+C:\AUTOEXEC.BAT > NUL
COPY AUTOEXEC.VC5 C:\AUTOEXEC.BAT > NUL
ECHO   ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ·
ECHO   ³ We now are ready to reboot the computer.     º
ECHO   ³                                              º
ECHO   ³ Please remove any diskette from the A: drive º
ECHO   ³ and hit a key when ready. This will be a     º
ECHO   ³ cold boot. Installation will continue        º
ECHO   ³ AUTOMATICALLY after this. No other action is º
ECHO   ³ required by you.                             º
ECHO   ³                                              º
ECHO   ³ If you wish, or if there is a boot problem,  º
ECHO   ³ hit your RESET button, or turn the computer  º
ECHO   ³ Off and back On again.                       º
ECHO   ÔÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ¼
ECHO ÿ
ECHO ÿ
ECHO     Remove any diskette from the A: drive.
ECHO     Then press a key to reboot now...
ECHO ÿ
PAUSE > NUL 
COPY AUTOBAT C:\AUTOEXEC.BAT
GET !C

:AFTERBOOT
ECHO ÿ
ECHO             ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
ECHO             º  CONTINUING INSTALLATION OF VC SHAREWARE  º
ECHO             ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ¼
ECHO ÿ
PROMPT $P$G
IF EXIST GET COPY GET GET.COM > NUL
ECHO     NOTE: You may not have your usual color screen at the moment.
ECHO           Your FULL and normal setup will be restored soon.
ECHO           Please bear with us through the rest of this short process.
ECHO ÿ
ECHO   ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ·
ECHO   ³ By rebooting the computer, we have established the best   º
ECHO   ³ possible conditions for initialization of VC. It is       º
ECHO   ³ important that the program have ONE look at your machine  º
ECHO   ³ in an "original" state. When we finish with initializing, º
ECHO   ³ there will be no restrictions on running software.        º
ECHO   ÔÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ¼
ECHO ÿ      
ECHO   We now will attempt to "initialize" VC.
ECHO   Hit a key to continue....
ECHO ÿ
PAUSE > NUL
COPY VC1 VC1.COM > NUL
VC1
IF NOT ERRORLEVEL 1 GOTO WEDIDIT
PAUSE
:VINITERR
ECHO ÿ
ECHO       Do you wish to [F]orce initialization, or,
ECHO       Do you wish to [S]top now and look for the trouble?
ECHO ÿ
ECHO    (If you choose [S]top, try again with the command VINIT.)
ECHO    (%0 will now delete itself and clean up the directory.)
ECHO ÿ
GET    Press [F] or [S] now.

IF ERRORLEVEL 84 GOTO VINITERR
IF ERRORLEVEL 83 GOTO VERYEND
IF ERRORLEVEL 71 GOTO VINITERR
IF ERRORLEVEL 70 GOTO TRYAGAIN
IF ERRORLEVEL 0 GOTO VINITERR
ECHO ÿ

:WEDIDIT
CLS
ECHO ÿ 
ECHO   INITIALIZATION SUCCESSFUL. Making the rest of the program....
COPY VC VC.EXE > NUL
COPY VC2 VC2.EXE > NUL
COPY VCHECK VCHECK.COM > NUL
COPY VCOMP VCOMP.COM > NUL
COPY BOOTFIX BOOTFIX.COM > NUL
ECHO   Making program backups...
COPY VC1.COM VC1.BIN > NUL
COPY VC.BIN VCBIN > NUL
COPY AUTOEXEC.!!! C:\AUTOEXEC.BAT > NUL
ECHO ÿ
ECHO    Thank you for installing Victor Charlie for a tryout.
ECHO    The following changes have been made to your Autoexec:
ECHO    1. A computer startup routine has been added. This will
ECHO       check your system every time you boot. This will add
ECHO       three or four seconds to your boot time under normal
ECHO       circumstances. It will HALT the machine in case of trouble.
ECHO    2. The VC Home Directory has been added to your path.
ECHO       This will allow you to use the program at any time.
ECHO       For a quick check, just type  " VC5 " and hit Enter
ECHO       To use the program menu, just type " VC "
ECHO    We hope you will like this new and secure method of 
ECHO    detecting, tracking and fixing virus (and other) attacks
ECHO    which may be made on your computer. If you find VC to
ECHO    be your type of program, please register. You will find
ECHO    the ORDER.DOC to do this in this VC Home Directory.
ECHO ÿÿ
ECHO ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
ECHO ³ If you change your DOS or basic setup (in CONFIG.SYS) you may ³
ECHO ³ have to re-initialize VC. Do this with the command " VINIT "  ³
ECHO ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
ECHO ÿ
ECHO   Press any key and we will reboot one more time to restore
ECHO   your normal computer setup.
ECHO ÿ
PAUSE > NUL
GET !W

GOTO VERYEND

:TRYAGAIN
CLS
ECHO ÿ
ECHO    Forcing initialization of VC...
COPY VC1 VC1.COM > NUL
VC1 !
IF ERRORLEVEL 1 GOTO VERYEND
GOTO WEDIDIT

GOTO VERYEND

:GETERROR
CLS
ECHO   This routine requires the VC utility GET.COM.
ECHO   Please place this utility in this directory. If you did not
ECHO   receive GET with your VC5 package, please contact your sysop
ECHO   and inform him that he has an incomplete VC package.
ECHO ÿ
GOTO VERYEND

:ENVERROR
CLS
ECHO ÿ
ECHO   %0 needs at least 30 bytes of free environment space.
ECHO   Please increase the amount of environement and try again.
ECHO ÿ
GOTO VERYEND

:GOTVIRUS
ECHO ÿ
ECHO   This machine appears to have an active virus!
ECHO   This is not a test message or a joke. GET.COM has
ECHO   been altered by virus-like activity. Turn this machine
ECHO   OFF for 30 seconds. Put a clean, write-protected DOS
ECHO   diskette in the A: drive and reboot. Come back here and
ECHO   try  "%0"  again, and we probably can defeat what
ECHO   seems to be a virus in the next half hour or so.
ECHO ÿ
GOTO VERYEND

:AUTOERR
ECHO ÿ
ECHO   %0 could not find a C:\AUTOEXEC.BAT on this computer,
ECHO   or could not make a copy of it as a backup.
ECHO   This indicates the machine is not ready for actual use, or
ECHO   does not have any useable disk space left. VC should not
ECHO   (or cannot) be installed on such a machine.
ECHO ÿ
GOTO VERYEND

:CLUP
ECHO    Placing VC startup check routine at the beginning of Autoexec ...
ECHO    Placing VC Home Directory in your path (if found) ...
COPY AUTOEXEC.!!! C:\AUTOEXEC.BAT > NUL
GET !J
IF ERRORLEVEL 4 GOTO VERYEND
IF "%GET%"=="31" GOTO VERYEND
IF "%GET%"=="3" GOTO VERYEND
ECHO ÿ
ECHO           !!! WARNING !!! 
ECHO   This machine appears to have DOS 3.2 or below.
ECHO   If so, the startup routine in Autoexec will not work.
ECHO   Please adjust " @echo off " to " echo off " and
ECHO   change the " CALL " to " COMMAND /C " as required.
ECHO   See your DOS manual for guidance on these commands.
ECHO ÿ

:VERYEND
