@DefineProject
        @Name           = "ZIP!Office"
        @Version        = "1.25"
        @OutDrive       = Z
        @Subdir         = "\\ZIP\\"
        @Requires       @HardDisk
        @InDiskBell     = 1
@EndProject

@DefineVars
  @Qstring @Server = @Version
  @Integer @nTemp = 0
  @Integer @bAbort = @False
  @Qstring @UpgradeFrom = ""
  @Integer @ReturnVal = 0
@EndVars

@Display
        @Cls

        This program will install @Name Release @Version on your computer
        system and verify the integrity of the distribution disks.
        You may press the [Esc] key at any time to cancel the installation.

        You must be authorized to create directories and files on the
        file server to install @Name.
        If you intend to use the @Name NetWare feature, you
        must be logged in as SUPERVISOR to install @Name.

        Each question has a default answer.  If the default answer is
        correct, press [Enter] in response to the question.
        Otherwise, type the answer and then press [Enter].

        If you make a mistake while typing, press [Backspace]
        and then retype the answer.


                                   @Pause
@EndDisplay

@GetGroups
        @Cls
        Now you need to select how @Name Release @Version will be installed.










        Use the [Up Arrow], [Down Arrow], [Pg Up], & [Pg Dn] keys to move
        the bar to the desired installation type and then press [Enter].

        @Set N = "New installation (no prior version)"
        @Set U = "Upgrade from ZIP!Mail Release 1.21 (and above)"
        @Set B = "Upgrade from @Name 1.0"
        @Set D = "Upgrade from @Name 1.1"
        @Set E = "Upgrade from @Name 1.2"        
        @Set C = "Install programs only"

@EndGroups

GETOUTDRIVE:

@GetOutDrive
        @Cls
        On which disk drive do you want to install @Name?
@EndOutDrive

@If (@Removable)
        @Display

            You can't install @Name onto a floppy drive.
            Please select another drive.
                                   @Pause
            @Goto GETOUTDRIVE
        @EndDisplay
@Endif 

@GetSubdir
        @Cls
        Now you need to specify the hard disk destination subdirectory.
        The subdirectory is the location on your disk where the @Name
        system will be installed.  If you don't know what a "subdirectory"
        is, you probably need not worry about it, and should just press
        [Enter] at the prompt below.

        @Prompt = "Which subdirectory?"
@EndSubdir

@If (
      ('U' [= @Group) |
      ('B' [= @Group) |
      ('D' [= @Group) |
      ('E' [= @Group) |
      ('C' [= @Group)
    ) /* only check for the lok file or upgrade.adm if we are upgrading...
         the stock "exists already" check will pick up the remaining case */

  @If ( @Exists "@OutDrive:\\@Subdir\\!LISTS\\LOGINS\\UPGRADE.ADM" )
    @GetOption
      @FlushOptions()
      @LocalWindow( 7, 40 )
      @Cls
                        Unable to Continue Installation

    The installation of ZIP!Office you specified is currently being upgraded.

      @Option 381 = "Continue with a different ZIP!Office Installation"
      @Option 382 = "Stop"
    @EndOption

    @If ( 381 [= @Option) /* get all new path information */
      @Goto GETOUTDRIVE
    @Else
      @Display
                         Installation Cancelled
        @Abort
      @EndDisplay
    @EndIf
  @EndIf

  @If ( @Exists "@OutDrive:\\@Subdir\\!LISTS\\LOGINS\\MAINT$$$.LOK" )
    @GetOption
      @FlushOptions()
      @LocalWindow( 7, 40 )
      @Cls
                        Unable to Continue Installation

    The installation of ZIP!Office you specified is currently undergoing
    system-wide maintenance.

      @Option 371 = "Continue with a different ZIP!Office Installation"
      @Option 372 = "Stop"
    @EndOption

    @If ( 371 [= @Option) /* get all new path information */
      @Goto GETOUTDRIVE
    @Else
      @Display
                         Installation Cancelled
        @Abort
      @EndDisplay
    @EndIf
  @EndIf
@EndIf

@If ( @Exists "@OutDrive:\\@Subdir\\!LISTS\\APDLNAME.BTR" )
    @MkDir ( "@OutDrive:\\@Subdir\\!LISTS\\LOGINS" )
    @Write ( "@OutDrive:\\@Subdir\\!LISTS\\LOGINS\\UPGRADE.ADM", "wt", "upgrading...\n" )
    @Write ( "@OutDrive:\\@Subdir\\!LISTS\\LOGINS\\MAINT$$$.LOK", "wt", "upgrading...\n" )
@Endif

/* If upgrade from 1.2, Offer to backup old ABS files */
@If ('E' [= @Group)
  @GetOption
    @LocalWindow( 15, 40 )
    @Cls
    If you are currently using Address Book Synchronization (ABS), 
    upgrading requires resynchronization of the existing address books.  
    
    The old ABS files can be renamed to *.old, allowing you to return 
    to the old server code at a future date. 

    @Option 501 = "Yes, backup old ABS files"
    @Option 502 = "No, don't back up the ABS files"
  @EndOption

  @If ( 501 [= @Option)  /* ren files */
    @Rename( "@OutDrive:\\@Subdir\\!APSYS\\ADRBOOK.BTR", 
             "ADRBOOK.OLD" )
    @Rename( "@OutDrive:\\@Subdir\\!APSYS\\CHGFILE.BTR", 
             "CHGFILE.OLD" )
    @Rename( "@OutDrive:\\@Subdir\\!APSYS\\HCFILE.BTR", 
             "HCFILE.OLD" )
    @Rename( "@OutDrive:\\@Subdir\\!APSYS\\SERLIST.BTR", 
             "SERLIST.OLD" )
    @Rename( "@OutDrive:\\@Subdir\\!APSYS\\EMPTY.DOC", 
             "EMPTY.OLD" )
  @EndIf
@EndIf

@If ('N' [= @Group)  // if a NEW install, check if overwriting old data files
  @If (
       (@Exists "@OutDrive:\\@Subdir\\!APSYS\\DSLOCAL.BTR") |
       (@Exists "@OutDrive:\\@Subdir\\!APSYS\\DSQCFGTB.BTR") |
       (@Exists "@OutDrive:\\@Subdir\\!APSYS\\NTDLCTB.BTR") |
       (@Exists "@OutDrive:\\@Subdir\\!APSYS\\NTLINKSC.BTR") |
       (@Exists "@OutDrive:\\@Subdir\\!APSYS\\DSFSTB.BTR") |
       (@Exists "@OutDrive:\\@Subdir\\!APSYS\\DSRTTB.BTR") |
       (@Exists "@OutDrive:\\@Subdir\\!APSYS\\DEFAULTS.DAT") |
       (@Exists "@OutDrive:\\@Subdir\\!APSYS\\NT3174TB.DAT") |
       (@Exists "@OutDrive:\\@Subdir\\!APSYS\\NT3278TB.BTR") |
       (@Exists "@OutDrive:\\@Subdir\\!APSYS\\EVENTS.BTR") |
       (@Exists "@OutDrive:\\@Subdir\\!APSYS\\DSPARMTB.DAT") |
       (@Exists "@OutDrive:\\@Subdir\\!APSYS\\DSUDIRTB.BTR") |
       (@Exists "@OutDrive:\\@Subdir\\!APSYS\\NTLU0TB.BTR") |
       (@Exists "@OutDrive:\\@Subdir\\!APSYS\\NTLU62TB.BTR") |
       (@Exists "@OutDrive:\\@Subdir\\!APSYS\\REPORTSP.BTR") |
       (@Exists "@OutDrive:\\@Subdir\\!APSYS\\ADRBOOK.BTR") |
       (@Exists "@OutDrive:\\@Subdir\\!APSYS\\CHGFILE.BTR") |
       (@Exists "@OutDrive:\\@Subdir\\!APSYS\\HCFILE.BTR") |
       (@Exists "@OutDrive:\\@Subdir\\!APSYS\\ABSCFG.DAT") |
       (@Exists "@OutDrive:\\@Subdir\\!APSYS\\ABSMUDIR.PRM") |
       (@Exists "@OutDrive:\\@Subdir\\!APSYS\\SECPARM.DAT") |
       (@Exists "@OutDrive:\\@Subdir\\!APSYS\\SECINFO.BTR") |
       (@Exists "@OutDrive:\\@Subdir\\!APSYS\\MHSMTOS.BTR") |
       (@Exists "@OutDrive:\\@Subdir\\!APSYS\\MHSSTOM.BTR") |
       (@Exists "@OutDrive:\\@Subdir\\!SNADSQI\\SNADSQ.BTR") |
       (@Exists "@OutDrive:\\@Subdir\\!LISTS\\APDLNAME.BTR") |
       (@Exists "@OutDrive:\\@Subdir\\!LISTS\\APDLMBRS.BTR") |
       (@Exists "@OutDrive:\\@Subdir\\!DIRECT\\APUDIR2.BTR") |
       (@Exists "@OutDrive:\\@Subdir\\!FNLIB\\APFNLIB.BTR") |
       (@Exists "@OutDrive:\\@Subdir\\!FNLIB\\APFNLIB.DAT") |
       (@Exists "@OutDrive:\\@Subdir\\!FNLIB\\CALPRINT.INI") |
       (@Exists "@OutDrive:\\@Subdir\\!FNLIB\\STDDAILY.WMF") |
       (@Exists "@OutDrive:\\@Subdir\\!FNLIB\\STDMTH1.WMF") |
       (@Exists "@OutDrive:\\@Subdir\\!FNLIB\\STDMTH1.WMF") |
       (@Exists "@OutDrive:\\@Subdir\\!FNLIB\\STDWEEK.WMF") |
       (@Exists "@OutDrive:\\@Subdir\\!APNCODE\\MODE.*") |
       (@Exists "@OutDrive:\\@Subdir\\!CAL\\!SYS\\CALD.BTR") |
       (@Exists "@OutDrive:\\@Subdir\\!CAL\\!SYS\\RES.BTR") |
       (@Exists "@OutDrive:\\@Subdir\\!CAL\\!SYS\\WINTXT.INI") |
       (@Exists "@OutDrive:\\@Subdir\\!CAL\\!SYS\\CALLOCAL.BTR" )
      )
       @GetOption
          @Cls







                             **** WARNING ****


    You are installing a "NEW" release of @Name.  But @Name or
    ZIP!Mail appears to be already installed.  If you choose to continue,
    existing data files will be destroyed.  All existing users, in-trays,
    etc. will be lost.
    Are you sure you want to do this?
          @Option 90 = "Yes, continue with the install"
          @Option 91 = "No, stop"
       @EndOption
  @EndIf
  @If (91 [= @Option)
    @GetOption
      @Cls
      Installation cancelled
      @If ( @Exists "@OutDrive:\\@SubDir\\!LISTS\\LOGINS\\UPGRADE.ADM" )
          @Delete ( "@OutDrive:\\@SubDir\\!LISTS\\LOGINS\\UPGRADE.ADM" )
          @Delete ( "@OutDrive:\\@SubDir\\!LISTS\\LOGINS\\MAINT$$$.LOK" )
      @Endif
      @Abort
    @EndOption
  @EndIf
@EndIf




@GetOption
  @Cls

  Please confirm the following:




    You are installing to drive: @OutDrive
                   subdirectory: @SubDir
  @If     ('N' [= @Group)
    This is a new installation
  @ElseIf ('U' [= @Group)
    You are upgrading from ZIP!Mail Release 1.21 (and above)
  @ElseIf ('B' [= @Group)
    You are upgrading from @Name 1.0
  @ElseIf ('D' [= @Group)
    You are upgrading from @Name 1.1
  @ElseIf ('E' [= @Group)
    You are upgrading from @Name 1.2
  @ElseIf ('C' [= @Group)
    You are installing the programs only
  @EndIf

  @If ('U' [= @Group)
    @If (@Exists "@OutDrive:\\@Subdir\\!APSYS")
    @Else
                             **** WARNING ****
    You have requested an upgrade from ZIP!Mail 1.21 (and above), but the
    existing ZIP!Mail cannot be found.  When you are upgrading, please
    specify the disk and subdirectory of the existing ZIP!Mail.
    @EndIf
  @EndIf

  @If ('B' [= @Group)
    @If (@Exists "@OutDrive:\\@Subdir\\!CAL")
    @Else
                             **** WARNING ****
    You have requested an upgrade from @Name 1.0, but the existing
    @Name cannot be found.  When you are upgrading, please specify the
    disk and subdirectory of the existing @Name.
    @EndIf

  @ElseIf ('D' [= @Group)
    @If (@Exists "@OutDrive:\\@Subdir\\!CAL")
    @Else
                             **** WARNING ****
    You have requested an upgrade from @Name 1.1, but the existing
    @Name cannot be found.  When you are upgrading, please specify the
    disk and subdirectory of the existing @Name.
    @EndIf

  @ElseIf ('E' [= @Group)
    @If (@Exists "@OutDrive:\\@Subdir\\!CAL")
    @Else
                             **** WARNING ****
    You have requested an upgrade from @Name 1.2, but the existing
    @Name cannot be found.  When you are upgrading, please specify the
    disk and subdirectory of the existing @Name.
    @EndIf
  @EndIf

  @Option 1 = "Yes, continue"
  @Option 2 = "No, stop"
@EndOption



@If (2 [= @Option)
  @GetOption
    @If (2 [= @Option)
      @Cls
          Installation cancelled
      @If ( @Exists "@OutDrive:\\@SubDir\\!LISTS\\LOGINS\\UPGRADE.ADM" )
          @Delete ( "@OutDrive:\\@SubDir\\!LISTS\\LOGINS\\UPGRADE.ADM" )
          @Delete ( "@OutDrive:\\@SubDir\\!LISTS\\LOGINS\\MAINT$$$.LOK" )
      @Endif
      @Abort
    @EndIf
  @EndOption
@EndIf

// For upgrades, back up !apsys\*.* to !apsys\!backup.zip
@If ( ( ( 'U' [= @Group ) | ( 'B' [= @Group ) |
        ( 'D' [= @Group ) | ( 'E' [= @Group ) ) &
      ( @Exists "@OutDrive:\\@Subdir\\!APSYS" ) )
  @Display
    @Cls
  @EndDisplay
  @MoveCStr ( 11, 13, , "Backing up !APSYS directory to !APSYS\\!BACKUP.ZIP..." )
  @MkDir ( "@OutDrive:\\@Subdir\\!APSYS\\!BACKUP.ZIP" )
  @Copy ( "@OutDrive:\\@Subdir\\!APSYS\\*.*",
          "@OutDrive:\\@Subdir\\!APSYS\\!BACKUP.ZIP" )
  @Display
    @Cls
  @EndDisplay
@Endif

// Note: wildcards can't be used to specify files which aren't in a library

// ========================================================================
//                           STARTING INSTALL
// ========================================================================

// set up the (empty) directories for later use

@MkDir ( "@OutDrive:\\@Subdir\\!LISTS" )
@MkDir ( "@OutDrive:\\@Subdir\\!LISTS\\LOGINS" )

//       ---------============= DISK 1 ==============----------

@DefineDisk
 @Label = "Installation Disk 1"
  @File README                 @Out !APSYS\*
  @File ZIPNEWS                @Out !APSYS\*
  @File INSTALL.EXE            @Out !APNCODE\DOSSETUP.*

 @BeginLib OFFICE1.LIF
  @File INSTALL2.BAT           @Out !APNCODE\*.*
  @File COPYDLLS.BAT           @Out !APNCODE\*.*
  @File INSTALL3.BAT           @Out !ADMCODE\*.*

  @File SETUP.EXE              @Out !APNCODE\SETUPWIN.EXE
  @File INSTALL.INS            @Out !APNCODE\*.*

  @File ZIPW.BMP               @Out !APNCODE\*.*
  @File INSTLOGO.BMP           @Out !APNCODE\*.*

  @File INSTALL.DAT            @Out !APNCODE\*.*

  @File HPLJIII.PRZ            @Out !APNCODE\*.*
  @File HPLJIIP.PRZ            @Out !APNCODE\*.*
  @File PS.PRZ                 @Out !APNCODE\*.*
  @File HPLJ.PRZ               @Out !APNCODE\*.*
  @File HPLJC.PRZ              @Out !APNCODE\*.*

  @File MAILUPGR.EXE           @Out !ADMCODE\*.*  @Group U
  @File CALDDEL.EXE            @Out !ADMCODE\*.*  @Group B
  @File ZIPCHECK.EXE           @Out !APNCODE\*.*
  @File ZIPNOTIF.EXE           @Out !APNCODE\*.*
  @File ZNINIT.EXE             @Out !APNCODE\*.*
  @File ZIPSEND.EXE            @Out !APNCODE\*.*
  @File BTRIEVE.EXE            @Out !APNCODE\*.*
  @File ZIPADMIN.EXE           @Out !ADMCODE\*.*
  @File *.OVL                  @Out !ADMCODE\*.*

  @File  ZIPW.HLP              @Out !APNCODE\*.*

 @EndLib
@EndDisk

//       ---------============= DISK 2 ==============----------

@DefineDisk
 @Label = "Installation Disk 2"
 @BeginLib OFFICE2.LIF

  @File ABS.DLL         @Out !SRVCODE\*.*
  @File APPCOVL.DLL     @Out !SRVCODE\*.*
  @File ASYNC.DLL       @Out !SRVCODE\*.*
  @File COREDLL.DLL     @Out !SRVCODE\*.*
  @File DSLOAD.DLL      @Out !SRVCODE\*.*
  @File GATE.DLL        @Out !SRVCODE\*.*
  @File MHSOVL.DLL      @Out !SRVCODE\*.*
  @File NETWARE.DLL     @Out !SRVCODE\*.*
  @File NI.DLL          @Out !SRVCODE\*.*
  @File NJEOVL.DLL      @Out !SRVCODE\*.*
  @File OVVM.DLL        @Out !SRVCODE\*.*
  @File QUIT.DLL        @Out !SRVCODE\*.*
  @File SDLC.DLL        @Out !SRVCODE\*.*
  @File SNALOAD.DLL     @Out !SRVCODE\*.*
  @File SPX.DLL         @Out !SRVCODE\*.*
  @File SPXPASS.DLL     @Out !SRVCODE\*.*
  @File TRING.DLL       @Out !SRVCODE\*.*
  @File TRPASS.DLL      @Out !SRVCODE\*.*
  @File WAIT.EXE        @Out !SRVCODE\*.*
  @File ZIPSERV.EXE     @Out !SRVCODE\*.*
  @File ZIPSERV0.EXE    @Out !SRVCODE\*.*

  @File CALD.BTR        @Out !CAL\!SYS\*.*
  @File RES.BTR         @Out !CAL\!SYS\*.* @Group NU
  @File DSLOCAL.BTR     @Out !CAL\!SYS\CALLOCAL.BTR @Group N
  @File USERINFO.BTR    @Out !CAL\!SYS\*.* @Group NUBD
  @File WINTXT.INI      @Out !CAL\!SYS\*.* @Group NUBD

  @File DSLOCAL.BTR     @Out !APSYS\*.*    @Group N
  @File DSQCFGTB.BTR    @Out !APSYS\*.*    @Group N
  @File NTDLCTB.BTR     @Out !APSYS\*.*    @Group N
  @File NT3278TB.BTR    @Out !APSYS\*.*    @Group N
  @File EVENTS.BTR      @Out !APSYS\*.*    @Group N
  @File NTLINKSC.BTR    @Out !APSYS\*.*    @Group NUBDE // SP: new for 1.2
  @File DSUDIRTB.BTR    @Out !APSYS\*.*    @Group N
  @File NTLU0TB.BTR     @Out !APSYS\*.*    @Group N
  @File NTLU62TB.BTR    @Out !APSYS\*.*    @Group N
  @File REPORTSP.BTR    @Out !APSYS\*.*
  @File ADRBOOK.BTR     @Out !APSYS\*.*    @Group NUBDE // replace 1.2
  @File SECINFO.BTR     @Out !APSYS\*.*    @Group NUBDE // new for 1.2
  @File SERLST.BTR      @Out !APSYS\*.*    @Group NUBDE // replace 1.2
  @File MHSMTOS.BTR     @Out !APSYS\*.*    @Group NUBDE // replace 1.2
  @File MHSSTOM.BTR     @Out !APSYS\*.*    @Group NUBDE // replace 1.2
  @File CHGFILE.BTR     @Out !APSYS\*.*    @Group NUBDE // replace 1.2
  @File HCFILE.BTR      @Out !APSYS\*.*    @Group NUBDE // replace 1.2
  @File DSFSTB.BTR      @Out !APSYS\*.*    @Group N
  @File DSRTTB.BTR      @Out !APSYS\*.*    @Group N
  @File DEFAULTS.DAT    @Out !APSYS\*.*    @Group N
  @File NT3174TB.DAT    @Out !APSYS\*.*    @Group N
  @File DSPARMTB.DAT    @Out !APSYS\*.*    @Group N
  @File SECPARM.DAT     @Out !APSYS\*.*    @Group NUBDE // new for 1.2
  @File ABSCFG.DAT      @Out !APSYS\*.*    @Group NUBDE // new for 1.2
  @File EMPTY.DOC       @Out !APSYS\*.*    @Group NUBDE // replace 1.2
  @File ABSMUDIR.PRM    @Out !APSYS\*.*    @Group NUBDE // new for 1.2

  @File SNADSQ.BTR      @Out !SNADSQI\*.*  @Group N

  @File APDLNAME.BTR    @Out !LISTS\*.*    @Group N
  @File APDLMBRS.BTR    @Out !LISTS\*.*    @Group N

  @File APUDIR2.BTR     @Out !DIRECT\*.*   @Group N


  @File APFNLIB.DAT     @Out !fnlib\samples\*.*
  @File LETTER.TXT      @Out !fnlib\samples\*.*
  @File TRIPRPT.WP      @Out !fnlib\samples\*.*
  @File EXPENSES.WKS    @Out !fnlib\samples\*.*
  @File DISK.ID         @Out !apncode\*.*

  @File APFNLIB.BTR     @Out !FNLIB\*.*    @Group N
  @File STDDAILY.WMF    @Out !FNLIB\*.*    @Group NUBDE // new for 1.2
  @File STDMTH1.WMF     @Out !FNLIB\*.*    @Group NUBDE // new for 1.2
  @File STDMTH2.WMF     @Out !FNLIB\*.*    @Group NUBDE // new for 1.2
  @File STDWEEK.WMF     @Out !FNLIB\*.*    @Group NUBDE // new for 1.2
  @File APFNLIB.EMP     @Out !FNLIB\*.DAT  @Group N
  @File CALPRINT.INI    @Out !FNLIB\*.*    @Group NUBDE // new for 1.2
  @File OLEMSG.DOC      @Out !FNLIB\*.*
  @File BTRKIT.EXE      @Out !FNLIB\*.*

  @File MODE.UNI        @Out !APNCODE\*.*  @Group N
  @File ZIPW.EXE        @Out !APNCODE\*.*
  @File ZIPW0.EXE       @Out !APNCODE\ZIPWX.*

  @File COMMSVCS.DLL    @Out !APNCODE\DLLS\*.DLL
  @File COMMDLG.DLL    @Out !APNCODE\DLLS\*.DLL

 @EndLib
@EndDisk

//       ---------============= DISK 3 ==============----------

@DefineDisk
 @Label = "Installation Disk 3"
 @BeginLib OFFICE3.LIF
  @File *.DLL                  @Out !APNCODE\DLLS\*.DLL
  @File *.CA                   @Out !APNCODE\DLLS\*.*
 @EndLib
@EndDisk

//       ---------============= DISK 4 ==============----------

@DefineDisk
 @Label = "Installation Disk 4"
 @BeginLib OFFICE4.LIF

  @File CP.EXE                 @Out !APNCODE\*.*

  @File  ZIPD.EXE              @Out !APNCODE\*.*
  @File  ZIPD.PCX              @Out !APNCODE\*.*
  @File  ZIPD0.EXE             @Out !APNCODE\ZIPDX.*
  @File  ZIPD.HLP              @Out !APNCODE\*.*
  @File  BTRCALLS.DLL          @Out !APNCODE\*.*
  @File  COMPRESS.EXE          @Out !APNCODE\*.*
  @File  COPYADBK.BAT          @Out !APNCODE\*.*
  @File  LOADADBK.BAT          @Out !APNCODE\*.*
  @File  ADDRCOPY.EXE          @Out !APNCODE\*.*
  @File  ZIPVIEW.EXE           @Out !APNCODE\*.*
  @File  CALOVL.DLL            @Out !SRVCODE\*.*

  @File  *.DLL                 @Out !APNCODE\DLLS\*.DLL

@EndLib
@EndDisk

//       ---------============= DISK 5 ==============----------

@DefineDisk
 @Label = "Installation Disk 5"
 @BeginLib OFFICE5.LIF
  @File  *.DLL                 @Out !APNCODE\DLLS\*.DLL
  @File  *.REG                 @Out !APNCODE\DLLS\*.REG
  @File  *.TLB                 @Out !APNCODE\DLLS\*.TLB

@EndLib
@EndDisk

//       ---------============= Final Cleanup ==============----------

@Finish
  @Cls
  @If ('N' [= @Group)
    @MkDir ("@OutDrive:\\@Subdir\\!WORK")
    @MkDir ("@OutDrive:\\@Subdir\\!SNADSQ")
  @EndIf
  @If (('N' [= @Group) | ('U' [= @Group ) | ('B' [= @Group ))
    @MkDir ("@OutDrive:\\@Subdir\\!FOLDERS")
  @EndIf
  @If (('N' [= @Group) | ('U' [= @Group ))
    @Write("@OutDrive:\\@Subdir\\!APNCODE\\SETUPDOS.BAT", "wt", "@@echo off\n" )
    @Write( , , "@OutDrive:\n" )
    @Write( , , "cd \\@Subdir\\!APNCODE\n" )
    @Write( , , "call DOSSETUP.EXE" )
  @EndIf
  @ChDrive @OutDrive
  @ChDir "@SubDir\\!APNCODE"
  @If ( 'U' [= @Group )
    @System("install2.bat U")
  @ElseIf ( 'B' [= @Group )
    @System("install2.bat B")
  @ElseIf ( 'N' [= @Group )
    @System("install2.bat N")
  @Else
    @System("install2.bat 0")
  @EndIf
  @Cls
  @ChDrive @OutDrive
  @ChDir "@SubDir\\!AdmCODE"
  @Cls
  @If ( 'U' [= @Group )
      @System("install3.bat U")
  @ElseIf ( 'B' [= @Group )
      @System("install3.bat B")
  @ElseIf ( 'N' [= @Group )
      @System("install3.bat N")
  @Else
      @System("install3.bat 0")
  @EndIf

  @If ( @Exists "@OutDrive:\\@SubDir\\!LISTS\\LOGINS\\UPGRADE.ADM" )
      @Delete ( "@OutDrive:\\@SubDir\\!LISTS\\LOGINS\\UPGRADE.ADM" )
      @Delete ( "@OutDrive:\\@SubDir\\!LISTS\\LOGINS\\MAINT$$$.LOK" )
  @Endif

  @If ( (@Exists "@OutDrive:\\@Subdir\\!APNCODE\\install2.log") &
        (@Exists "@OutDrive:\\@Subdir\\!ADMCODE\\install3f.log")  )
             @Cls
                    ZIP!Office Installation Complete

                               @Pause
  @Else
             @Cls
             ZIP!Office Installation Completed Unsuccessfully

                               @Pause
  @EndIf
@EndFinish
