home *** CD-ROM | disk | FTP | other *** search
/ Gear Audio / Gear Audio CD-ROM.iso / csav / dos / install.dat < prev    next >
Encoding:
INSTALL Professional project  |  1999-01-31  |  15.0 KB  |  666 lines

  1. /*
  2.  *   Command AntiVirus Installation Program
  3.  *   Copyright (C) 1993,94,95 Command Software Systems
  4.  *
  5.  *   Edited by Command Software GC,SPB
  6.  *   Date      = June 13,1995
  7.  *   #Disk     = 1
  8.  */
  9. @DefineProject
  10.     @Name = "Command AntiVirus for DOS"
  11.     @Version = "4.54 SP1"
  12.     @OutDrive = C               // DRIVE
  13.     @SubDir = "\\F-PROT"        // DIRECTORY
  14. @EndProject
  15.  
  16. @DefineVars
  17.  
  18.     /*
  19.      * SILENT specifies no interaction, defaults are automatically used
  20.      * and no pauses are used. INTERACT allows the user to answer questions
  21.      * involving the installation
  22.      */
  23.     @QString @Mode          = "INTERACT"   // SILENT, INTERACT
  24.  
  25.     /* Specifies whether Command AntiVirus is to be installed or not, the indented
  26.      * section is the section that if YES is answered to this question, the
  27.      * following values will be taken into account, if NO then the
  28.      * following values will automatically be omitted */
  29.     @QString @FPInst        = "YES"     // YES,NO
  30.  
  31.        /* Specifies whether or not to load the DOS interface for the Command AntiVirus
  32.     * program */
  33.        @QString @FPDOS         = "YES"    // YES, NO
  34.  
  35.        /* Specifies whether or not to load Command AntiVirus from the AUTOEXEC.BAT */
  36.        @QString @FPAuto        = "YES"   // YES, NO
  37.  
  38.     /* Do you want to install the utilities */
  39.     @QString @UtilInst      = "YES"
  40.  
  41.        /* Do you want to install the Data Integrity Checker, CHECK */
  42.        @QString @UtilCheck     = "YES"
  43.  
  44.        /* Do you want to install the LOGIN.COM file so you can load TSR's
  45.     * ( VIRSTOP )from the system login script */
  46.        @QString @UtilLogin     = "NO"
  47.  
  48.        /* Do you want to install the software REBOOT program */
  49.     @QString @UtilReboot    = "YES"
  50.  
  51.        /* Do you wish to install the Command AntiVirus batch files */
  52.        @QString @UtilBatch     = "YES"
  53.  
  54.     /* Sets the FPDATA path including the FILENAME. Use skip as an
  55.      * option if you do not want this set command in your AUTOEXEC.BAT */
  56.     @QString @FPData        = "SKIP" // SKIP, [PATH,FILENAME]
  57.  
  58.     /* Settings for the Command AntiVirus placed in the AUTOEXEC.BAT file */
  59.     @QString @FPOptions     = "/HARD /TODAY" //FP manual pg.19
  60.  
  61.     /* This sets the modify your boot up files options: YES, Command AntiVirus goes
  62.      * ahead and changes your AUTOEXEC.BAT and CONFIG.SYS, NO, Command AntiVirus does
  63.      * not, SAVE Command AntiVirus saves the changes to a file with the extension NEW(
  64.      * AUTOEXEC.NEW, CONFIG.NEW ) for later.  */
  65.     @QString @ModifyBoot    = "YES"   // YES, NO, SAVE
  66.  
  67.     /* @BatSetup if set to true will place lines for the AUTOEXEC.BAT
  68.      * file above the last line in the AUTOEXEC.BAT file; if set to false
  69.      * it will place lines at the bottom of the AUTOEXEC.BAT file.*/
  70.     @Integer @Batsetup      = @TRUE
  71.  
  72.     @QString @Foreign       = "YES"
  73.     @QString @Core          = "NO"
  74.  
  75.     /* In house use, should not be touched */
  76.     @QString @ModAuto       = "NO"
  77.     @QString @GetWin        = " "
  78.     @QString @ZIPOPT        = ""
  79. @EndVars
  80.  
  81.  
  82.  
  83. // Main code section
  84. WELCOME:
  85.  
  86. // Check if the windir env. var. is being used
  87. @GetWin = @GetEnv "windir"
  88.  
  89. // If it is assume Windows is in Memory
  90. @If( @StrLen( @GetWin ) > 3 )
  91.    @Display
  92.       @CLS
  93.  
  94.     Installation of @Name onto platforms other
  95.     than DOS is not supported. If you have purchased the wrong product,
  96.     please contact your software provider.
  97.  
  98.       @Pause
  99.    @EndDisplay
  100.    @Exit
  101. @Endif
  102.  
  103. @If( @StrFind( "@StartupDrive", "C" ) == 0 )
  104.    @Display
  105.       @CLS
  106.  
  107.  
  108.       @Name's Installation will not run on drive C:.
  109.       Please use the NETDISK.BAT program to copy files
  110.       to the hard drive to do an install from the hard drive
  111.  
  112.       @Pause
  113.    @EndDisplay
  114.    @Exit
  115. @Endif
  116.  
  117. // Check if the silent mode was used
  118. @If( @StrFind( @Mode, "SILENT")==0)
  119.  
  120.    // If so, skip interaction
  121.    @Goto Install
  122.  
  123. @Endif // Else continue with program
  124.  
  125.  
  126.    @Display
  127.       @Cls
  128.  
  129.               Command AntiVirus @Version
  130.  
  131.     Welcome to the @Name installation program!
  132.     This program will install @Name v@Version
  133.     on your computer. To continue this installation
  134.     press ENTER. To quit the install program at any time
  135.     press ESC.
  136.  
  137.       @PAUSE
  138.    @EndDisplay
  139.  
  140. // Main menu
  141. MAIN:
  142.  
  143.    // Display the main screen
  144.    @FlushGroups()
  145.    @GetGroups
  146.    @CLS
  147.            @Name v@Version Installation
  148.  
  149.    CSAV Directory ---- @OutDrive:@SubDir
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.    Use the [Up Arrow], [Down Arrow], [Pg Up] and [Pg Dn] keys to move the
  166.    bar to the desired menu selection and then press [Enter].
  167.  @Endif @Set i = "        INSTALL Command AntiVirus "
  168.       @Set d = "Customize Command AntiVirus Directory"
  169.       @Set f = "Customize Command AntiVirus DOS Options"
  170.       @Set u = "Customize Utility/Integrity Options"
  171.       @LocalWindow( 12, 36 )
  172.    @EndGroups
  173.    @if ('d' [= @Group)
  174.      @ClearGroup(d)
  175.      @Goto FPDir
  176.    @EndIf
  177.    @if ('f' [= @Group)
  178.      @ClearGroup(f)
  179.      @Goto FPROT
  180.    @EndIf
  181.    @if ('u' [= @Group)
  182.      @ClearGroup(u)
  183.      @Goto UTIL
  184.    @EndIf
  185.    @if('i' [= @Group)
  186.      @ClearGroup(i)
  187.      @Goto Install
  188.    @EndIf
  189. @Goto MAIN      // GO BACK TO MAIN MENU
  190.  
  191. FPDir:
  192.   @FlushGroups()
  193.   @GetGroups
  194.   @CLS
  195.   @MoveCStr( 1,2,30, "Command AntiVirus v@Version")
  196.   CSAV Drive       : @OutDrive
  197.   CSAV Directory   : @SubDir
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.  
  207.  
  208.  
  209.  
  210.  
  211.  
  212.    Use the [Up Arrow], [Down Arrow], [Pg Up] and [Pg Dn] keys to move the
  213.    bar to the desired menu selection and then press [Enter].
  214.   @Set m = "Return to Main Menu"
  215.   @Set f = "Command AntiVirus Drive"
  216.   @Set p = "Command AntiVirus Directory"
  217.   @LocalWindow( 12, 39 )
  218.   @EndGroups
  219.   @If ( 'f' [= @Group )
  220.      @ClearGroup(f)
  221.      @Goto FPDRIVE
  222.   @Endif
  223.   @If ( 'p' [= @Group )
  224.      @ClearGroup(p)
  225.      @Goto FPDirect
  226.   @Endif
  227.   @If ( 'm' [= @Group )
  228.      @ClearGroup(m)
  229.      @Goto Main
  230.   @Endif
  231. @Goto FPDir
  232.  
  233. FPDRIVE:
  234.   @GetOutDrive @OutDrive                      // get the output drive
  235.     @Suppress A                             // skip A
  236.     @Suppress B                             // skip B
  237.     @CLS
  238.     @MoveCStr( 1,2,30, "Command AntiVirus v@Version")
  239.     @MoveCStr( 2,2,11, "CSAV Drive       : @OutDrive")
  240.   CSAV Directory   : @SubDir
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.         Please select the drive to install @Name.
  255.  
  256.    Use the [Up Arrow], [Down Arrow], [Pg Up] and [Pg Dn] keys to move the
  257.    bar to the disk drive to install to and then press [Enter].
  258.       @LocalWindow( 10, 38 )
  259.       @EndOutDrive
  260.  
  261. @Goto FPDir
  262.  
  263. FPDirect:
  264.       @GetSubdir @SubDir
  265.      @CLS
  266.      @MoveCStr( 1,2,30, "Command AntiVirus v@Version")
  267.   CSAV Drive       : @OutDrive
  268.    @MoveCStr( 3,2,11, "CSAV Directory   : @SubDir")
  269.  
  270.  
  271.  
  272.  
  273.      @Default = "@SubDir"  // GET THE DIRECTORY
  274.      @Prompt = "Enter the name of the sub-directory for Command AntiVirus"
  275.       @EndSubdir
  276. @Goto FPDir
  277.  
  278.  
  279. FPROT:
  280.   @FlushGroups()
  281.   @GetGroups
  282.   @CLS
  283.   @MoveCStr( 1,3,30, "Command AntiVirus v@Version")
  284.    Command AntiVirus for DOS    : @FPDOS
  285.    Command AntiVirus in AUTOEXEC: @FPAUTO
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.    Press Enter when the selection is highlighted to toggle the selection
  298.    between YES and NO. The current setting of the item is located in the
  299.    upper left hand corner.
  300.  
  301.    Use the [Up Arrow], [Down Arrow], [Pg Up] and [Pg Dn] keys to move the
  302.    bar to the desired option and then press [Enter] to toggle YES or NO.
  303.   @Set m = "Return to Main Menu"
  304.   @Set f = "Command AntiVirus for DOS"
  305.   @Set w = "Command AntiVirus in AUTOEXEC"
  306.   @LocalWindow( 10, 39 )
  307.   @EndGroups
  308.   @If ( 'f' [= @Group )
  309.      @ClearGroup(f)
  310.      @If( @StrFind( @FPDOS, "YES")==0)
  311.     @FPDOS="NO"
  312.      @Else
  313.     @FPDOS = "YES"
  314.      @Endif
  315.      @Goto FPROT
  316.   @Endif
  317.   @If ( 'w' [= @Group )
  318.      @ClearGroup(w)
  319.      @If( @StrFind( @FPAUTO, "YES")==0)
  320.     @FPAUTO="NO"
  321.      @Else
  322.     @FPAUTO = "YES"
  323.     @Goto BatchSetup
  324.      @Endif
  325.      @Goto FPROT
  326.   @Endif
  327.   @If ( 'm' [= @Group )
  328.      @ClearGroup(m)
  329.      @Goto Main
  330.   @Endif
  331. @Goto FPROT
  332.  
  333. BatchSetup:
  334.       @FlushGroups()
  335.       @GetGroups
  336.       @CLS
  337.  
  338.        Does your computer boot to Microsoft Windows or a menu system?
  339.  
  340.  
  341.  
  342.  
  343.  
  344.  
  345.  
  346.  
  347.  
  348.  
  349.  
  350.  
  351.     If you answer "Yes" lines will be added just before the last line of
  352.     your AUTOEXEC.BAT. If you answer "No", then the lines will be added
  353.     at the end of your AUTOEXEC.BAT.
  354.  
  355.     Use the [Up Arrow], [Down Arrow], [Pg Up] and [Pg Dn] keys to move
  356.     the bar to the option you wish to choose and then press [Enter].
  357.            @LocalWindow(10,38)
  358.         @Set a = "Yes"
  359.         @Set b = "No"
  360.      @Endgroups
  361.      @If ('a' [= @Group)
  362.        @BatSetup = @True
  363.      @Else
  364.        @BatSetup = @False
  365.      @EndIf
  366. @Goto FPROT
  367.  
  368. UTIL:
  369.   @FlushGroups()
  370.   @GetGroups
  371.   @CLS
  372.   @MoveCStr( 1,3,30, "Command AntiVirus v@Version")
  373.    Integrity Checker : @UtilCheck
  374.    REBOOT.COM        : @UtilReboot
  375.    BATCH files       : @UtilBatch
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.    Press Enter when the selection is highlighted to toggle the selection
  386.    between YES and NO. The current setting of the item is located in the
  387.    upper left hand corner.
  388.  
  389.    Use the [Up Arrow], [Down Arrow], [Pg Up] and [Pg Dn] keys to move the
  390.    bar to the desired option and then press [Enter] to toggle YES or NO.
  391.   @Set m = "Return to Main Menu"
  392.   @Set f = "Integrity Checker"
  393.   @Set r = "REBOOT.COM"
  394.   @Set b = "BATCH Files"
  395.   @LocalWindow( 11, 39 )
  396.   @EndGroups
  397.   @If ( 'f' [= @Group )
  398.      @ClearGroup(f)
  399.      @If( @StrFind( @UtilCheck, "YES")==0)
  400.     @UtilCheck="NO"
  401.      @Else
  402.     @UtilCheck = "YES"
  403.      @Endif
  404.      @Goto UTIL
  405.   @Endif
  406.   @If ( 'b' [= @Group )
  407.      @ClearGroup(b)
  408.      @If( @StrFind( @UtilBatch, "YES")==0)
  409.     @UtilBatch="NO"
  410.      @Else
  411.     @UtilBatch="YES"
  412.      @Endif
  413.      @Goto UTIL
  414.   @Endif
  415.   @If ( 'r' [= @Group )
  416.      @ClearGroup(r)
  417.      @If( @StrFind( @UtilReboot, "YES")==0)
  418.     @UtilReboot="NO"
  419.      @Else
  420.     @UtilReboot = "YES"
  421.      @Endif
  422.      @Goto UTIL
  423.   @Endif
  424.   @If ( 'm' [= @Group )
  425.      @ClearGroup(m)
  426.      @Goto Main
  427.   @Endif
  428. @Goto UTIL
  429.  
  430. Install:
  431.  
  432. @If( @DiskFree(@OutDrive) < 2000k)
  433.    @GetGroups
  434.    @CLS
  435.  
  436.  
  437.  
  438.  
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.    @OutDrive drive does not have enough memory to install this program.
  450.  
  451.    Use the [Up Arrow], [Down Arrow], [Pg Up] and [Pg Dn] keys to move the
  452.    bar to the option you wish to choose and then press [Enter].
  453.       @LocalWindow( 10, 38)
  454.       @Set a = "Cancel Install"
  455.       @Set b = "Change Drive"
  456.    @EndGroups
  457.    @if ( 'a' [= @Group )
  458.       @Exit
  459.    @EndIf
  460.    @if ( 'b' [= @Group )
  461.       @Goto MAIN
  462.    @EndIf
  463. @Endif
  464.  
  465. @If(@StrFind( @Mode, "SILENT")!=0)
  466.    @If (@Exists "@OutDrive:\\@SubDir\\SIGN.DEF")
  467.     @FlushGroups()
  468.     @GetGroups
  469.     @CLS
  470.               Existing Version of Command AntiVirus found
  471.  
  472.  
  473.  
  474.  
  475.  
  476.  
  477.  
  478.  
  479.  
  480.     @Name appears to be installed in:
  481.     @MoveCStr(12,4,30,"@OutDrive:@SubDir")
  482.  
  483.     Select          @MoveCStr(14,11, 30, "Continue")if you are installing an update or have some
  484.     files you wish to re-install,                  @MoveCStr( 15, 34, 30, "Change Directory" )to make a new
  485.     directory to install Command AntiVirus, or        @MoveCStr( 16, 47, 30, "Cancel" )to quit the install.
  486.  
  487.     Use the [Up Arrow], [Down Arrow], [Pg Up] and [Pg Dn] keys to move
  488.     the bar to the option you wish to choose and then press [Enter].
  489.         @LocalWindow(7, 38)
  490.         @Set c = "Continue"
  491.         @Set d = "Change Directory"
  492.         @Set q = "Cancel Install"
  493.  
  494.     @EndGroups
  495.     @If ('c'[= @Group )
  496.     @Endif
  497.     @If ('d' [= @Group )
  498.        @Goto MAIN
  499.     @Endif
  500.     @If ( 'q' [= @Group )
  501.        @Exit
  502.     @EndIf
  503.    @Endif
  504. @Endif
  505.  
  506. FILEDO:
  507.  
  508. /* Write the files from Disk1 to Destination */
  509. Disk1:
  510.    @ChDrive @OutDrive
  511.    @MkDir("@OutDrive:\\@SubDir")
  512.  
  513.    @If( @StrFind( @UtilBatch,"YES")==0)
  514.       @DefineDisk
  515.      @Label = "Disk 1 of 2"
  516.      @File SE_SCAN.EXE
  517.       @EndDisk
  518.    @Endif
  519.  
  520.    @If( @StrFind( @UtilCheck, "YES")==0)
  521.      @DefineDisk
  522.        @Label = "Disk 1 of 2"
  523.        @File SE_CHCK.EXE
  524.      @EndDisk
  525.    @EndIf
  526.  
  527.    @If( @StrFind( @UtilReboot,"YES")==0)
  528.      @DefineDisk
  529.        @Label = "Disk 1 of 2"
  530.        @File REBOOT.COM
  531.      @EndDisk
  532.    @Endif
  533.  
  534.    @DefineDisk
  535.      @Label = "Disk 1 of 2"
  536.      @File COMEXIT.COM
  537.      @File FPUNZIP.BAT
  538.      @File FIND.EXE
  539.    @EndDisk
  540.  
  541.    @If( @StrFind( @FPDOS, "YES")==0)
  542.      @DefineDisk
  543.        @Label = "Disk 1 of 2"
  544.        @File README.TXT
  545.        @File VIR-HELP.ENG
  546.      @EndDisk
  547.    @Endif
  548.  
  549.    @If( @StrFind( @FPDOS, "YES")==0)
  550.      @DefineDisk
  551.        @Label = "Disk 2 of 2"
  552.        @File FIXDISK.EXE
  553.        @File F-PROT.EXE
  554.        @File ENGLISH.TX1
  555.      @File ENGLISH.TX0
  556.        @File SIGN.DEF
  557.      @File Macro.def
  558.      @File Rescue.bat
  559.      @File AUTOEXEC.FPT
  560.      @EndDisk
  561.      @If( @StrFind( @Foreign, "YES") == 0)
  562.     @Copy("@StartupDrive:@StartupDir\\*.TX0","@OutDrive:@SubDir\\*.TX0")
  563.      @Endif
  564.    @Endif
  565.  
  566.    @If( @StrFind( @FPAuto,"YES" )==0 )
  567.     @If( @StrFind( @FPDOS, "YES")==0)
  568.       @FPAuto="AUTO"
  569.       @ModAuto="YES"
  570.     @Endif
  571.    @Endif
  572.  
  573. @If( @StrFind( @ModAuto,"YES")==0)
  574.    @If( @StrFind( @Mode, "SILENT")!=0)
  575.       @FlushGroups()
  576.       @GetGroups
  577.      @CLS
  578.                   AUTOEXEC.BAT Changes
  579.  
  580. @If( @StrFind( @FPAUTO, "AUTO")==0)   @OutDrive:@SubDir\F-PROT @FPOptions @Endif
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.    These are the changes to be made to the AUTOEXEC.BAT. One can have
  591.    INSTALL make the changes, have INSTALL save the changes to a file for
  592.    future consideration, or discard the changes needed to be made.
  593.  
  594.    Use the [Up Arrow], [Down Arrow], [Pg Up] and [Pg Dn] keys to move the
  595.    bar to the option you wish to choose and then press [Enter].
  596.     @LocalWindow( 9, 38) @Set a = "Make Changes to AUTOEXEC.BAT"
  597.      @Set b = "Save Changes to AUTOEXEC.FPT"
  598.      @Set c = "Discard Changes"
  599.       @EndGroups
  600.       @if ( 'a' [= @Group )
  601.      @ModifyBoot="YES"
  602.       @Endif
  603.       @if ( 'b' [= @Group )
  604.      @ModifyBoot="SAVE"
  605.       @Endif
  606.       @If ( 'c' [= @Group )
  607.      @ModifyBoot="NO"
  608.       @Endif
  609.    @Endif
  610.  
  611.    @If( @StrFind( @ModifyBoot,"NO")!=0)
  612.       @SetAutoexec
  613.      @If( @StrFind( @ModifyBoot, "YES")==0)
  614.         @Overwrite
  615.      @Else
  616.         @DiskProto
  617.      @Endif
  618.      @If(@BatSetup)
  619.         @AUTOINSERTNEXTTOLAST
  620.      @Else
  621.         @AUTOINSERTLAST
  622.      @Endif
  623.      @If ( @StrFind ( @FPDATA, "SKIP" ) != 0 )
  624.         @Verbatim "Set FP-Data=@FPDATA"
  625.      @EndIf
  626.      @If( @StrFind( @FPAUTO, "AUTO")==0)
  627.         @Verbatim "@OutDrive:@SubDir\\F-PROT @FPOptions"
  628.         @Path = "@OutDrive:@SubDir;"
  629.      @Endif
  630.       @EndAutoexec
  631.    @Endif
  632. @Endif
  633.  
  634. END:
  635. /* Conclusionary code */
  636. @Finish
  637.  
  638.    @If( @StrFind( @Core, "YES")==0)
  639.      @If( @StrFind( @Foreign, "YES") == 0)
  640.     @Copy("@StartupDrive:@StartupDir\\*.TX0","@OutDrive:@SubDir\\*.TX0")
  641.      @Endif
  642.    @Endif
  643.  
  644.    @CLS
  645.    @If( @StrFind( @Mode, "SILENT")!=0)
  646.       @CLS
  647.     Thank you for choosing Command Software Systems!
  648.  
  649.     Should @Name report a virus, please refer
  650.     to your documentation for instructions on how to proceed.
  651.  
  652.     Install will now decompress the Command AntiVirus files in the
  653.     destination directory.
  654.  
  655.     @Pause
  656.     @EndIf
  657.  
  658.     @ChDrive @OutDrive
  659.     @ChDir   "@SubDir"
  660.     @If( @StrFind( @ModifyBoot, "YES" )!=0)
  661.        @Execute("COMEXIT.COM NOREBOOT")
  662.     @Else
  663.        @Execute("COMEXIT.COM @ZIPOPT")
  664.     @Endif
  665.   @EndFinish
  666.