home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 1995 April / PCPRO_595.ISO / fprot / install.dat < prev    next >
Encoding:
INSTALL Professional project  |  1995-01-15  |  11.8 KB  |  467 lines

  1. /*
  2.  *   F-PROT Professional Installation Program
  3.  *   Copyright (C) 1993,94 Command Software Systems
  4.  *
  5.  *   Edited by Steven Brittin @ Command Software
  6.  *   Date      = August 17, 1994
  7.  *   #Disk     = 2
  8.  */
  9.  
  10. @DefineProject
  11.     @Name = "F-PROT Professional"
  12.     @Version = "2.16"
  13.     /*
  14.      * @OutDrive = the drive that one wants the F-PROT program on.
  15.      * @SubDir   = the directory or path located on the OutDrive
  16.      *              that one wants F-PROT to be place in.
  17.      */
  18.     @OutDrive = C
  19.     @SubDir = "\\F-PROT"
  20. @EndProject
  21.  
  22. /*
  23.  * The following block is for system administrators to set the variables
  24.  * for the questions that would normall2y be asked during installation.
  25.  * IN PLACES WHERE A "\" IS NEEDED PLEASE PLACE "\\" IN ORDER FOR IT TO
  26.  * BE READ CORRECTLY BY THE PROGRAM.
  27.  */
  28. @DefineVars
  29.     /*
  30.      * All variables with the True and False capability must be printed
  31.      * the First letter capital and the rest lower case; otherwise, it may
  32.      * not work correctly.
  33.      * @Mode sets the type of installation.  QUESTION allows the user to
  34.      * input the variables for the setup of the program during installation.
  35.      * MESSAGE tells the user which defaults are being used but will not let
  36.      * him/her change the settings.  SILENT displays minimal information and
  37.      * only prompts the user to tell him/her that his/her configuration files
  38.      * have been changed.
  39.      */
  40.     @QString @Mode             = "QUESTION" // QUESTION,MESSAGE,SILENT
  41.  
  42.     /*
  43.      * @WinDrive is the hard drive letter where the Windows program is
  44.      * located at.
  45.      * @WinDirectory is the directory or path where the Windows program
  46.      * is located on the WinDrive
  47.      * @WinFProt if set to true loads the windows support for this program
  48.      * and modifies the win.ini file appropriately; if set to false it
  49.      * aborts the windows installation.  If the specified Windows directory
  50.      * is not existant then windows install still aborts.
  51.      */
  52.     @Drive   @WinDrive         = C
  53.     @Dir     @WinDirectory     = "\\WINDOWS"
  54.     @Integer @WinFProt         = @True
  55.  
  56.  
  57.     /* Use either NOVCAST or BANCAST and any command line options desired:
  58.      * @QString @Broadcast =
  59.      *  "NOVCAST /GROUP=NET-PROT"
  60.      *  "NOVCAST /USER=SUPERVISOR"
  61.      *  "BANCAST /GROUP=Chicago Sales@WCTUS"
  62.      *  "BANCAST /USER=Joe@Tech@Command /LOG"
  63.      */
  64.     @QString @Broadcast  = "NOVCAST"
  65.  
  66.  
  67.     /*
  68.      * @FProtUpgrade searches for a previous version; if set to true install
  69.      * automatically aborts the install no matter what.
  70.      * @Upgrade if set to true aborts the installation process if a previous
  71.      * version of F-PROT is found on OutDrive at SubDir; if set to false
  72.      * it continues to load even though it found a previos version.
  73.      */
  74.     @Integer @FProtUpgrade     = @False
  75.     @Integer @Upgrade          = @False
  76.  
  77.     /*
  78.      * @ChangeAuto if set to true it adds lines to the AUTOEXEC.BAT
  79.      * file; if set to false, install will not add lines to the AUTOEXEC.BAT
  80.      * @BatSetup if set to true will place lines for the AUTOEXEC.BAT
  81.      * file above the last line in the AUTOEXEC.BAT file; if set to false
  82.      * it will place lines at the bottom of the AUTOEXEC.BAT file.
  83.      */
  84.     @Integer @ChangeAuto = @True
  85.     @Integer @BatSetup   = @True
  86.  
  87.     /*
  88.      * @Options are the switches for an F-PROT line in the autoexec.bat.
  89.      * If you do not want the line in the Autoexec.bat, place the word SKIP
  90.      * in quotes.  All switches within the quotes should have a "/"
  91.      * first, followed by a valid switch which is listed in the manual.
  92.      * @FPDATA is the path for the environment variable FP-DATA. To not set
  93.      * the environment variable, place SKIP inbetween the quotations.
  94.      * Remember to place two \'s instead of one for each occurence.
  95.      * @SOPTIONS is the options you can add to the F-PROT that runs when
  96.      * the installation is done.  If left blank it brings up the F-PROT
  97.      * interactive menuing system. If SKIP is placed in the quotations it
  98.      * does not execute F-PROT after installation.
  99.      */
  100.     @QString @Options    = "SKIP"
  101.     @QString @FPDATA     = "SKIP"
  102.     @QString @SOPTIONS   = ""
  103.  
  104.     @Integer @AlreadyInstalled
  105. @EndVars
  106.  
  107. @If (@StrFind ( @Mode , "SILENT" ) != 0 )
  108.    /* Introduction */
  109.    @Display
  110.       @Cls
  111.  
  112.               F-PROT Professional @Version
  113.  
  114.     Welcome to the @Name installation program!
  115.     This program will install @Name v@Version
  116.     on your computer.
  117.  
  118.     If you are installing from a network or a single floppy,
  119.     look at the README.DOC file for instructions on file setup.
  120.  
  121.       @PAUSE
  122.    @EndDisplay
  123. @Endif
  124.  
  125. @If (@StrFind ( @Mode, "QUESTION" ) == 0 )
  126.    @GetOutDrive                                    // get the output drive
  127.       @Cls
  128.    Please select the drive to install @Name.
  129.     @Suppress A                             // skip A
  130.     @Suppress B                             // skip B
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.    Use the [Up Arrow], [Down Arrow], [Pg Up] and [Pg Dn] keys to move the
  148.    bar to the disk drive to install to and then press [Enter].
  149.    @EndOutDrive
  150.  
  151.    @GetSubdir
  152.       @Default = "@Subdir"
  153.       @Prompt = "Enter the name of the sub-directory to install F-PROT:"
  154.    @EndSubdir
  155. @Endif
  156.  
  157. @If (@StrFind ( @Mode, "MESSAGE" )==0)
  158.    @Display
  159.    @Cls
  160.  
  161.    The destination disk and directory is @OutDrive:@Subdir
  162.  
  163.    @Pause
  164.    @EndDisplay
  165. @Endif
  166.  
  167. /*
  168.  * Checks for an all-ready existing copy of F-PROT.exe at the
  169.  * destination drive/directory. If there set the variable FProtUpgrade.
  170.  */
  171. @If (@Exists "@OutDrive:\\@SubDir\\F-PROT.EXE")
  172.    @If (@StrFind ( @Mode, "QUESTION")==0)
  173.       @GetGroups
  174.  
  175.     @Name appears to be installed. Select "Yes" if you
  176.     are installing an update or have deleted some files you wish to
  177.     re-install.
  178.  
  179.     Use the [Up Arrow], [Down Arrow], [Pg Up] and [Pg Dn] keys to move
  180.     the bar to the option you wish to choose and then press [Enter].
  181.  
  182.      @LocalWindow(12, 38)
  183.  
  184.      @Set y = "Yes"
  185.      @Set n = "No"
  186.  
  187.       @EndGroups
  188.       @If ('n'[= @Group )
  189.      @FProtUpgrade = @True
  190.       @else
  191.      @FProtUpgrade = @False
  192.       @EndIf
  193.    @Else
  194.       @FProtUpgrade = @Upgrade
  195.    @Endif
  196.    @If (@StrFind ( @Mode , "MESSAGE") == 0 )
  197.       @Display
  198.       @CLS
  199.  
  200.  
  201.   Another version of F-PROT has been detected on the machine.
  202.  
  203.       @Pause
  204.       @EndDisplay
  205.    @Endif
  206. @Endif
  207.  
  208. /* Write the files from Disk1 to Destination */
  209. @DefineDisk
  210.   @Label = "Disk 1/1"
  211.     @File README.DOC
  212.     @File VIRSTOP.EXE
  213.     @File ENGLISH.TX0
  214.     @File F-PROT.EXE
  215.     @File SIGN.DEF
  216.     @File UPDATE.BAT
  217.     @File FIXDISK.EXE
  218.     @File CS-TSR.COM
  219.     @File F-TEST.COM
  220.     @File LOGIN.COM
  221.     @File REBOOT.COM
  222.     @File V-CHECK.COM
  223.     @File B-CHECK.COM
  224.     @File VIR-HELP.ENG
  225.     @File BANCAST.EXE
  226.     @File CHECK.EXE
  227.     @File NOVCAST.EXE
  228.     @File VINESMSG.EXE
  229.     @File VSCONFIG.EXE
  230.     @File VINESMSG.PIF
  231. @EndDisk
  232.  
  233. /* Pending Value of FProtUpgrade the installation is aborted or continued */
  234. @If (@FProtUpgrade)
  235.    @Display
  236.  
  237.     Installation aborted.
  238.  
  239.  
  240.        @Pause
  241.    @EndDisplay
  242.    @Exit
  243. @Endif
  244.  
  245. @If (@StrFind( @Mode, "QUESTION" ) == 0 )
  246.    @GetGroups
  247.  
  248.    Would you like to install Windows support for Virstop?
  249.  
  250.    Use the [Up Arrow], [Down Arrow], [Pg Up] and [Pg Dn] keys to move the
  251.    bar to the option you wish to choose and then press [Enter].
  252.  
  253.       @LocalWindow( 10, 38)
  254.       @Set a = "Yes"
  255.       @Set b = "No"
  256.    @EndGroups
  257.    @If ('a' [= @Group)
  258.       @WinFProt = @True
  259.    @Else
  260.       @WinFProt = @False
  261.    @Endif
  262. @Endif
  263.  
  264. @If (@WinFProt)
  265.    @If (@StrFind ( @Mode , "QUESTION")==0)
  266.       @GetOutDrive @WinDrive           // get the output drive
  267.       @Cls
  268.     Select the drive where Microsoft Windows is installed.
  269.     @Suppress A                             // skip A
  270.     @Suppress B                             // skip B
  271.  
  272.  
  273.  
  274.  
  275.  
  276.  
  277.  
  278.  
  279.  
  280.  
  281.  
  282.  
  283.  
  284.  
  285.  
  286.  
  287.     Use the [Up Arrow], [Down Arrow], [Pg Up] and [Pg Dn] keys to move the
  288.     bar to the disk drive to install to and then press [Enter].
  289.       @EndOutDrive
  290.  
  291.       @GetSubDir @WinDirectory
  292.  
  293.  
  294.  
  295.      @Default = "@WinDirectory"
  296.      @Prompt = "Enter the Windows directory."
  297.       @EndSubdir
  298.    @Endif
  299.    @If ( @StrFind ( @Mode, "MESSAGE" ) == 0 )
  300.       @Display
  301.      @Cls
  302.  
  303.  
  304.        The windows drive and directory are @WinDrive:@WinDirectory
  305.  
  306.      @Pause
  307.       @EndDisplay
  308.    @Endif
  309. @Endif
  310.  
  311. @If ( @WinFProt )
  312.    @If (@Exists "@WinDrive:\\@WinDirectory\\NUL")
  313.    @Else
  314.       @WinFProt = @FALSE
  315.       @Display
  316.       @Cls
  317.  
  318.  
  319.       No Windows directory found.  Discontinuing windows support.
  320.  
  321.       @Pause
  322.       @EndDisplay
  323.    @EndIf
  324. @Endif
  325.  
  326. /* Pending Value of WinFProt, the windows support is setup. */
  327. @If (@WinFProt)
  328.     @DefineDisk
  329.     @Label = "Disk 1/1"
  330.     @File VIRSTOP.DLL @Out @WinDrive:\@WinDirectory\*.*
  331.     @File WVIRSTOP.EXE @Out @WinDrive:\@WinDirectory\*.*
  332.     @EndDisk
  333.     @If (@Spawn ("WVIRSTOP @WinDrive:\\@WinDirectory /QUIET") == 0)
  334.        @If (@StrFind ( @Mode , "SILENT") != 0 )
  335.       @Display
  336.  
  337.     Windows support for Virstop successfully installed in WIN.INI.
  338.  
  339.  
  340.          @Pause
  341.       @EndDisplay
  342.        @Endif
  343.     @Else
  344.     @Display
  345.  
  346.     An error occurred and WVIRSTOP was not added to your WIN.INI.
  347.  
  348.  
  349.     @Pause
  350.     @EndDisplay
  351.     @Endif
  352. @Endif
  353.  
  354. @If (@StrFind ( @Mode, "QUESTION") == 0 )
  355.    @FlushGroups()
  356.    @GetGroups
  357.     Does your computer boot to Microsoft Windows or a menu system?
  358.     If you answer "Yes" then VIRSTOP and NOVCAST will be added just
  359.     before the last line of your AUTOEXEC.BAT. If you answer "No", then
  360.     the lines will be added at the end of your AUTOEXEC.BAT.
  361.  
  362.     Use the arrow keys to make your selection.
  363.  
  364.            @LocalWindow(10,38)
  365.         @Set a = "Yes"
  366.         @Set b = "No"
  367.  
  368.    @Endgroups
  369.    @If ('a' [= @Group)
  370.       @BatSetup = @True
  371.    @Else
  372.       @BatSetup = @False
  373.    @EndIf
  374. @Endif
  375.  
  376. /*
  377.  * Pending the value of BatSetup the proper routine for AUTOEXEC.BAT
  378.  * insertion is selected.
  379.  * Pending the value of ChangeAuto the Autoexec insertion routine is
  380.  * executed.
  381.  */
  382. @If (@StrFind ( @Mode, "QUESTION")==0)
  383.    @GetGroups
  384.  
  385.  
  386.  
  387.     Do you wish to modify your AUTOEXEC.BAT?
  388.  
  389.     @LocalWindow(10,38)
  390.     @Set y = "Yes"
  391.     @Set n = "No"
  392.    @EndGroups
  393.    @If ( 'y' [= @Group )
  394.       @ChangeAuto = @True
  395.    @Else
  396.       @ChangeAuto = @False
  397.    @Endif
  398. @EndIf
  399.  
  400. @If ( @ChangeAuto )
  401.    @If ( @BatSetup )
  402.       @SetAutoexec
  403.      @Overwrite
  404.      @AUTOINSERTNEXTTOLAST
  405.      @If ( @StrFind ( @FPDATA, "SKIP" ) != 0 )
  406.           @Verbatim "=Set FP-Data=@FPDATA"
  407.      @EndIf
  408.      @Verbatim "@OutDrive:\\@SubDir\\VIRSTOP"
  409.      @Verbatim "@OutDrive:\\@SubDir\\@Broadcast"
  410.      @If ( @StrFind ( @Options, "SKIP" ) != 0 )
  411.        @Verbatim "@OutDrive:\\@SubDir\\F-PROT.EXE @OPTIONS"
  412.      @Endif
  413.       @EndAutoexec
  414.    @Else
  415.       @SetAutoexec
  416.      @Overwrite
  417.      @AUTOINSERTLAST
  418.      @If ( @StrFind ( @FPDATA, "SKIP" ) != 0 )
  419.           @Verbatim " Set FP-Data=@FPDATA"
  420.      @EndIf
  421.      @Verbatim "@OutDrive:\\@SubDir\\VIRSTOP"
  422.      @Verbatim "@OutDrive:\\@SubDir\\@Broadcast"
  423.      @If ( @StrFind ( @Options, "SKIP" ) != 0 )
  424.        @Verbatim "@OutDrive:\\@SubDir\\F-PROT.EXE @OPTIONS"
  425.      @Endif
  426.       @EndAutoexec
  427.    @Endif
  428. @Endif
  429.  
  430.  
  431. /* Conclusionary code */
  432. @Finish
  433.     @If (@Spawn ("@OutDrive:\\@Subdir\\FIXDISK INSTALL") == 0)
  434.        @If (@StrFind ( @Mode , "SILENT") != 0 )
  435.  
  436.     FIXDISK successfully installed
  437.  
  438.  
  439.          @Pause
  440.        @Endif
  441.     @Else
  442.  
  443.     An error occurred and FIXDISK was not installed
  444.  
  445.  
  446.     @Pause
  447.     @Endif
  448. @CLS
  449. @If ( @StrFind ( @Mode, "SILENT" ) != 0 )
  450.     The @Name installation is complete.
  451.     Thank you for choosing Command Software Systems!
  452.  
  453.     @Name will now run. To customize Virstop's
  454.     alert message or default switches, run VSCONFIG.EXE from DOS.
  455.  
  456.     Should @Name report a virus, please refer
  457.     to your documentation for instructions on how to proceed.
  458.  
  459.     @Pause
  460. @EndIf
  461.     @ChDrive @OutDrive
  462.     @ChDir   "@SubDir"
  463.     @If ( @StrFind ( @SOPTIONS , "SKIP" ) != 0 )
  464.        @Execute("F-PROT.EXE @SOPTIONS")
  465.     @EndIf
  466. @EndFinish
  467.