/*
 * Install script for VirusScan for OS/2 
 *
 * Project: VirusScan  BBS EVALUATION copy 
 * Version: 2.2.1 
 * Media: 1.44 MB 
 * Build 1
 * Last Modified 04/20/95 by Kenny Liang 
 * 
 */

@DefineProject
	@Name = "OS2SCAN"
	@Version = "2.2"
  @OutDrive = C
  @SubDir = "\\MCAFEE"
  @AssumeHardDisk = 1
@EndProject

@ClearOption(1001)
@ClearOption(1002)
@ClearOption(2001)
@ClearOption(2002)
@ClearOption(3001)
@ClearOption(3002)
@ClearOption(4001)
@ClearOption(4002)
@ClearOption(5000)
@ClearOption(5001)
@ClearOption(9000)
@ClearOption(9001)

/* Set default installation paths */
@DefineVars
  @Drive @SCANDrive = C
  @Dir @SCANDir = "\\MCAFEE\\OS2SCAN"
@EndVars

/* Check to see if OS/2 Version is below 2.0 */
@If (@OSMajor==1)
  @Display
    @MoveCStr(01,01,79," McAFEE ")
    @MoveCStr(05,04,78," WARNING!") @MoveCStr(05,13,79,"  Installation has detected OS/2 Version 1.x installed on    ")
    @MoveCStr(06,04,79,"           this system.  VirusScan for OS/2 requires OS/2 Version 2.0 ")
    @MoveCStr(07,04,79,"           or higher in order to successfully run.  Please upgrade    ")
    @MoveCStr(08,04,79,"           your system before installing VirusScan for OS/2.          ")
    @Move(20,1)
    @Pause
  @Exit
@EndIf
// Why is there @EndDisplay here?

/* Display Title Screen */
@Display
  @Cls
  @MoveCStr(01,17,31," Welcome to the McAfee VirusScan for OS/2 ")
  @MoveCStr(02,17,31,"           Installation Program           ")
  @MoveCStr(05,06,23," This program will copy VirusScan for OS/2 (OS2SCAN.EXE) onto your ")
  @MoveCStr(06,06,23," IBM OS/2 2.0 or higher CPU and optionally update your CONFIG.SYS  ")
  @MoveCStr(07,06,23," and AUTOEXEC.BAT files to allow you to run VirusScan for OS/2 and ")
  @MoveCStr(08,06,23," use the VShield memory-resident virus-prevention program for your ")
  @MoveCStr(09,06,23," DOS and WIN-OS2 sessions.                                         ")
  @MoveCStr(12,06,23," Now is a good time to fill out your VirusScan registration card if")
  @MoveCStr(13,06,23," you have not done so.  Thank you for purchasing McAfee VirusScan. ")
  @MoveCStr(16,06,23," Press the [Esc] key at any time to stop the VirusScan installation")
  @MoveCStr(18,12,23," Copyright (c) 1994,1995 McAfee Associates, Inc..  All rights reserved.")
  @Move(19,01)
				     @Pause
@EndDisplay

/* Select VirusScan Installation Drive, Directory */
GetAll:
@ClearOption(4001)
@ClearOption(4002)
@GetOutDrive @SCANDrive
  @Suppress (0,17)
  @MoveCStr(01,24,31," VirusScan Installation Drive ")
  @MoveCStr(05,01,23," NOTE:  Use the Up and Down")
  @MoveCStr(06,01,23," Arrow keys and Enter to choose")
  @MoveCStr(07,01,23," a drive.  The blinking bar is")
  @MoveCStr(08,01,23," the cursor.")
  @Move(16,1)
     This allows you to specify the drive to install VirusScan onto.  This
     includes the VirusScan program files, online documentation files, and
     companion program files for VirusScan.  The next screen allows you to
     specify the directory in which to install VirusScan.
@EndOutDrive
@GetSubDir @SCANDir
  @Prompt = "Which subdirectory? ([Enter] = @SCANDir)"
  @MoveCStr(01,22,31," VirusScan Installation Directory ")
  @MoveCStr(03,03,23,"Into which directory on Drive @SCANDrive: should the VirusScan files be installed?")
  @MoveCStr(16,38,31,"NOTE TO HPFS USERS:")
  @MoveCStr(17,38,23,"Since the VShield virus-protection")
  @MoveCStr(18,38,23,"program is for DOS and WIN-OS2 files")
  @MoveCStr(19,38,23,"you must select a directory that can")
  @MoveCStr(20,38,23,"be accessed by these programs.")
@EndSubDir

/* Check for old version */
@If (@Exists("@SCANDrive:\\@SCANDir\\OS2SCAN.EXE")||
     @Exists("@SCANDrive:\\@SCANDir\\VSHIELD.EXE")||
     @Exists("@SCANDrive:\\MCAFEE\\OS2SCAN\\VSHIELD.EXE")||
     @Exists("@SCANDrive:\\MCAFEE\\OS2SCAN\\OS2SCAN.EXE")||
     @Exists("@SCANDrive:\\MCAFEE\\SCANOS2\\VSHIELD.EXE")||
     @Exists("@SCANDrive:\\MCAFEE\\SCANOS2\\OS2SCAN.EXE"))
     
  @Move(13,01)
  @GetOption
      VirusScan appears to be installed in @SCANDrive:@SCANDir.
      Do you wish to update it to the current version?
  @Option 4001 = "Yes, Update prior version"
  @Option 4002 = "No,  Select another drive"
@EndOption
@EndIf

@If (4002 [= @Option) 
  @Goto GetAll  
@EndIf

SCAN_OK:

/* Update AUTOEXEC.BAT */
@ClearOption(5000)
@ClearOption(5001)

@If (@Exists("@BootDrive:\\AUTOEXEC.BAT"))
  @GetOption
    @Cls
    @MoveCStr(01,24,31," Update Your AUTOEXEC.BAT File ")
    @Move(13,01)
    To completely install VirusScan for OS/2, changes need to be made to
    your CONFIG.SYS and AUTOEXEC.BAT files.  The PATH statement will be
    updated with the @SCANDrive:@SCANDir directory, and VShield will be
    added to your AUTOEXEC.BAT file to provide virus protection in DOS
    and WIN-OS2 sessions.
    Do you want Install to do this for you?
    
    @Option 5000 = "Yes, modify the AUTOEXEC.BAT file"
    @Option 5001 = "No, save sample modifications to MCAFEE.BAT"
  @EndOption
@Else
  @Display
    The AUTOEXEC.BAT file cannot be found on your boot drive.
    Normally, the installation would modify this file to load the
    VShield virus-protection program when you run DOS and WIN-OS2
    programs.

    A sample file has been created as @SCANDrive:@SCANDir\.VSH.TXT
				
				@Pause
  @EndDisplay
@EndIf

/*
 * All information available now, go ahead and copy files
 */

CompleteInstall:
@if (5000 [= @Option)
@MoveCStr(00,01,31," Updating AUTOEXEC.BAT file... ")
@MoveCStr(01,01,31," Copying VirusScan for OS/2 files... ")

@SetAutoexec
  @Overwrite
  @SetAppend("MCAFEE","@SCANDrive:@SCANDir;")
  @Path = "@SCANDrive:\\@SCANDir;"
  @Verbatim "@SCANDrive:@SCANDir\\VSHIELD.EXE"
@EndAutoexec
@else
@MoveCStr(00,01,31," Copying VirusScan for OS/2 files... ")
@if (@Exists("BootDrive:\\MCAFEE.BAT"))
    @Delete("BootDrive:\\MCAFEE.BAT")
  @endIf
@System("ECHO REM ----- This line loads McAfee's VShield ----- >> @BootDrive:\\MCAFEE.BAT")
@System("ECHO @SCANDrive:\\@SCANDir\\VSHIELD.EXE >> @BootDrive:\\MCAFEE.BAT")
@System("TYPE @BootDrive:\\AUTOEXEC.BAT >> @BootDrive:\\MCAFEE.BAT")
@System("ECHO REM ----- This line re-activates VShield in case it has been disabled ----- >> @BootDrive:\\MCAFEE.BAT")
@System("ECHO @SCANDrive:\\@SCANDir\\VSHIELD.EXE /RECONNECT >> @BootDrive:\\MCAFEE.BAT")
@endif

@If (!(@Exists("@SCANDrive:\\@SCANDir")))
  @MkDir ("@SCANDrive:\\@SCANDir")
@EndIf

@Copy("OS2SCAN.EXE","@SCANDrive:\\@SCANDir\\*.*")
@Copy("SCAN.DAT","@SCANDrive:\\@SCANDir\\*.*")
@Copy("NAMES.DAT","@SCANDrive:\\@SCANDir\\*.*")
@Copy("CLEAN.DAT","@SCANDrive:\\@SCANDir\\*.*")

@DefineDisk
	@Label = "Disk #1"
	@BeginLib OS221E.001
		@F README.1ST @S 1596 @O @SCANDrive:\@SCANDir\README.1ST
		@F CLEAN.DAT @S 65427 @O @SCANDrive:\@SCANDir\CLEAN.DAT
		@F NAMES.DAT @S 163860 @O @SCANDrive:\@SCANDir\NAMES.DAT
		@F SCAN.DAT @S 163502 @O @SCANDrive:\@SCANDir\SCAN.DAT
		@F FILE_ID.DIZ @S 164 @O @SCANDrive:\@SCANDir\FILE_ID.DIZ
		@F OS2SCAN.EXE @S 251490 @O @SCANDrive:\@SCANDir\OS2SCAN.EXE
		@F OS2VAL.EXE @S 51264 @O @SCANDrive:\@SCANDir\OS2VAL.EXE
		@F PACKING.LST @S 2111 @O @SCANDrive:\@SCANDir\PACKING.LST
		@F AGENTS.TXT @S 31772 @O @SCANDrive:\@SCANDir\AGENTS.TXT
		@F COMPUSER.TXT @S 6252 @O @SCANDrive:\@SCANDir\COMPUSER.TXT
		@F FILENAME.TXT @S 1956 @O @SCANDrive:\@SCANDir\FILENAME.TXT
		@F LICENSE.TXT @S 22941 @O @SCANDrive:\@SCANDir\LICENSE.TXT
		@F REGISTER.TXT @S 3585 @O @SCANDrive:\@SCANDir\REGISTER.TXT
		@F VALIDATE.TXT @S 2987 @O @SCANDrive:\@SCANDir\VALIDATE.TXT
		@F VIRUSCAN.TXT @S 240479 @O @SCANDrive:\@SCANDir\VIRUSCAN.TXT
		@F VSHIELD.DAT @S 194314 @O @SCANDrive:\@SCANDir\VSHIELD.DAT
		@F CHKVSHLD.EXE @S 18947 @O @SCANDrive:\@SCANDir\CHKVSHLD.EXE
		@F VSHEML.EXE @S 30876 @O @SCANDrive:\@SCANDir\VSHEML.EXE
		@F VSHIELD.EXE @S 206921 @O @SCANDrive:\@SCANDir\VSHIELD.EXE
		@F VSHINST.EXE @S 44110 @O @SCANDrive:\@SCANDir\VSHINST.EXE
		@F VSHLDCRC.EXE @S 45099 @O @SCANDrive:\@SCANDir\VSHLDCRC.EXE
		@F VSHLDWIN.EXE @S 29394 @O @SCANDrive:\@SCANDir\VSHLDWIN.EXE
	@EndLib
@EndDisk


AllDone:
@Finish
	     @Name installation is now completed.

@ChDrive @SCANDrive
@ChDir "@SCANDir"

				   @Pause
@EndFinish

