@Echo Off

REM * * * * * * * * * * * * * * * * * * *
REM * Program Copyright DigitAl56K 1999 *
REM * * * * * * * * * * * * * * * * * * *

If Exist F-Prot.Exe Goto VerCheck
Echo Error - This program must be run from the F-Prot for DOS directory.
Pause
Goto End

:VerCheck
If Exist Sign2.Def Goto OSFind
Echo Warning - You are using an old version of F-Prot!
Echo This means that F-Prot may not be able to detect some recent viruses.
Echo You should update F-Prot as new revisions of the software and its definition
Echo are made available. Definition file updates are usually more frequent then
Echo software revisions.
Echo.
Echo Information on updating F-Prot can be found in Updates.Txt
Pause

:OSFind
Set OSDir=
If Not %1*==* Set OSDir=%1
If %OSDir%*==* Set OSDir=%WinBootDir%
If %OSDir%*==* Set OSDir=%WinDir%
If %OSDir%*==* Set OSDir=\DOS
If Exist %OSDir%\RamDrive.Sys Goto Menu
Echo Error - Could not determine your OS directory
Echo Please include the full OS path as a command line parameter.
Echo Example: AVDISK C:\WINDOWS
Pause
Goto End


:Menu
Cls
Echo AV disk Creator
Echo ===============
Echo.
Echo This program will allow you to make startup disks containing the
Echo F-Prot for DOS anti-virus software. You will need two blank 1.44MB
Echo floppy disks ready to continue.
Echo.
Echo Please select an option:
Echo.
Echo    1 - Format a disk in drive A
Echo    2 - Create the startup AV disks
Echo    3 - Exit this program
Choice /C:123 /N
If ErrorLevel 3 Goto End
If ErrorLevel 2 Goto Create1

Cls
Echo Format disk in drive A
Echo ======================
Echo.
Echo Please insert a 1.44MB floppy disk into drive A and make sure that
Echo it is not write protected.
Echo.
Format A: /V:F-ProtDOS
Goto Menu


:Create1
Cls
Echo Creating AV disk 1
Echo ==================
Echo.
Echo You are now ready to create AV startup disk 1.
Echo Please make sure you have a blank write enabled 1.44MB floppy disk
Echo in drive A before proceeding.
Echo.
Pause

Echo Making disk bootable...
Sys A: >Nul

Echo Copying system files...
Copy %OSDir%\HiMem.Sys A:\ /Y >NUL
Copy %OSDir%\EMM386.Exe A:\ /Y >NUL
Copy %OSDir%\RamDrive.Sys A:\ /Y >NUL
Copy Config.Avd A:\Config.Sys /Y >NUL
Copy AutoExec.Avd A:\AutoExec.Bat /Y >NUL
Copy Search.Avd A:\Search.Bat /Y >NUL
Copy CopyInfo.Avd A:\CopyInfo.Bat /Y >NUL
Copy SearchRD.Avd A:\SearchRD.Exe /Y >NUL
If Exist %OSDir%\Choice.Com Copy %OSDir%\Choice.Com A:\ /Y >NUL
If Exist %OSDir%\Command\Choice.Com Copy %OSDir%\Command\Choice.Com A:\ /Y >NUL
If Exist A:\Choice.Com Goto CFP
Echo.
Echo WARNING:
Echo AVDisk could not locate Choice.Com which is required for Disk 1
Echo You will have to copy this file from your system manually.
Echo.
Pause

:CFP
Echo Copying F-Prot definitions...
Copy Macro.Def A:\ /Y >Nul
If Exist Sign2.Def Copy Sign2.Def A:\ /Y >Nul
Copy *.Tx0 A:\ /Y >Nul

:Create2
Cls
Echo Creating AV disk 2
Echo ==================
Echo.
Echo You are now ready to create AV startup disk 2.
Echo Please make sure you have a blank write enabled 1.44MB floppy disk
Echo in drive A before proceeding.
Echo.
Pause
If Exist A:\Macro.Def Goto Create2

Echo Copying F-Prot definitions...
Copy Sign.Def A:\ /Y >Nul
Echo Copying F-Prot program...
Copy F-Prot.Exe A:\ /Y >Nul

Cls
Echo Finished creating AV disks
Echo ==========================
Echo.
Echo Your AV startup disks are complete. Make sure both disks
Echo are write protected. Do not write enable these disks again.
Echo.
Echo You can start F-Prot for DOS by placing disk 1 in drive A
Echo before the computer starts up. Some BIOS systems require that you
Echo change the computers boot sequence to boot from drive A before
Echo the hard drive. To do this follow the on-screen prompts to enter
Echo your BIOS system when the computer is starting (this usually involves
Echo pressing a key such as Delete or F1). Set the BIOS boot sequence
Echo to read drive A first, save changes and allow the computer to restart.
Echo.
Pause


:End
Set OSDir=
Cls
