;
;                       Product Installation System Script
;
;                               Lotus Organizer 1.1
;
;
;                       (C) Lotus Development Corporation 1991-93
;
;       Jointly developed by Lotus Development Corporation and Threadz Limited
;
;
;       Release Date:           7th May 1993

	SYSMESSAGE 1 "Copying %s"
	SYSMESSAGE 2 "Please insert %s into drive %c."
	SYSMESSAGE 3 "Source file %s not found. Continue?"
	SYSMESSAGE 4 "%s already exists. Overwrite?"
	SYSMESSAGE 5 "Error creating %s"
	SYSMESSAGE 6 "Deleting %s"
	SYSMESSAGE 7 "Renaming %s"
	SYSMESSAGE 8 "Cancel"
	SYSMESSAGE 9 "Cannot find/load %s, continue?"
	SYSMESSAGE 10 "Cannot initialize %s, install halted"
	SYSMESSAGE 11 "Cannot query %s for version, install halted"
	SYSMESSAGE 12 "Cannot terminate %s, install halted"
	SYSMESSAGE 13 "Cannot find/load source library %s, install halted"
	SYSMESSAGE 14 "Bad schedule engine library, install halted"
	SYSMESSAGE 15 "Bad organizer network library, install halted"
	SYSMESSAGE 16 "%s does not have calendar information in directory services, continue?"
	SYSMESSAGE 17 "Unable to obtain server connection, cannot copy up %s, continue?"
	SYSMESSAGE 18 "Cannot find target file %s, copy and continue?"
	SYSMESSAGE 19 "Decompression error for file %s (error %d), continue?"
	SYSMESSAGE 20 "Invalid or missing version info for source file %s, continue?
	SYSMESSAGE 21 "Unable to load VER.DLL."
	SYSMESSAGE 22 "Unable to add %s to PATH in AUTOEXEC.BAT file."
	SYSMESSAGE 23 "Unable to load library %s [%d]"

; SAVE/RESTORE values
;	0 = TRUE if single user (FALSE if Server install)
;	1 = TRUE if Scheduling installed
;	2 = TRUE if SETUPDIR was run
;	3 = TRUE if we needed to update DLLs and couldn't
;	4 = TRUE if an old version of organizer existed
;	5 = TRUE if we are doing workstn install without copying

#if INSTALL.INF
	CAPTION         Lotus Organizer 1.1 Installation
#elseif UNINSTAL.INF
	CAPTION         Lotus Organizer 1.1 Un-Installation
#elseif WORKSTN.INF
	CAPTION         Lotus Organizer 1.1 Workstation Installation
#elseif SETUPDIR.INF
	CAPTION		Lotus Organizer 1.1 Directory Installation
#else
	GOTO Big_End
#endif


#if INSTALL.INF or WORKSTN.INF or SETUPDIR.INF
;
; Display the copyright notice
;
	DIALOG WELCOME
#endif

;
; Initialize some variables
;
#if SETUPDIR.INF
; Set the DIRADMIN question to TRUE always 
	EQUAL "" ""
	SAVE 2
	SETDESTDIR      $(STARTDIR)
	SETORGDBDIR	$(DESTDIR)\Users
; Guess about where maildll's are
	GOTO Diradmin_Start
#else
	EQUAL "" "NOT"
	SAVE 0
	SAVE 1
	SAVE 2
	SAVE 3
	SAVE 4
	SAVE 5
#endif


#if INSTALL.INF or WORKSTN.INF

	EQUALI          $(VIDEOMODE)    CGA
	IF YES          MESSAGE "Your monitor has a CGA display. Lotus Organizer requires a VGA display to operate. Please upgrade your hardware before installing the product."
	IF YES          GOTO Big_End

	EQUALI          $(VIDEOMODE)    EGA
	IF NO                   GOTO No_EGA

	QUESTION        "Your monitor has an EGA display. Lotus Organizer requires a VGA display to operate. If you install Lotus Organizer on this system, you may experience some display problems. Do you want to continue installation?"
	IF NO                   GOTO Big_End

:No_EGA

#endif ; install or workstn


#if INSTALL.INF or WORKSTN.INF

	WINDOW          ORGTESTCLASS
	IF NO     	GOTO No_Threadz_Utils

	MESSAGE         Lotus Organizer Test program is running. You need to exit Install, close the Organizer Test program and restart Install.
	GOTO            Big_End
:No_Threadz_Utils


	WINDOW          TZ_PORG
	IF NO           GOTO Local_Org_Not_Running

	MESSAGE         Lotus Organizer is already running. You need to exit Install, close the Organizer and restart Install.
	GOTO            Big_End
:Local_Org_Not_Running

	WINDOW          TZ_FIXCLASS
	IF NO                   GOTO Local_Utils_Not_Running

	MESSAGE         Lotus Organizer Utilities is running. You need to exit Install, close the Organizer Utilities and restart Install.
	GOTO                    Big_End
:Local_Utils_Not_Running

#endif ; install or workstation


#ifn SETUPDIR.INF
	RESETDISKS
	DISKS   "Lotus Organizer Install Disk"
	DISKS   "Lotus Organizer Administration Disk"

	RESETFILES
#endif

;
; Set the source directory for installation
;
#if INSTALL.INF
	SETSRCDIR       $(STARTDIR)\Organize
	$(USERDIR) = GETPROFILE $(WINDIR)\Lotus.Ini "Lotus Applications" Organize C:\Organize\Organize.Exe
	$(DESTDIR) = LOOSEFILE $(USERDIR)

#elseif WORKSTN.INF
	SETSRCDIR       $(STARTDIR)

; Install Version DLL if needed for windows 3.0
	EXIST $(SYSDIR)\Ver.DLL
	IF NO FILES $(SRCDIR)\Ver.DLL		$(SYSDIR)\Ver.DLL	-R 0 1 "Version DLL"


; NOTE: Remove the ;;;; from next line to disable copying of the Organizer 
;	install program to local workstations during Workstation Install.
;;;;	GOTO No_Local_Copy

;
; Ask about installing local or using public copy
;
	INSTALLPUBLIC
	IF NO  GOTO Local_Copy

:No_Local_Copy

	SETDESTDIR      $(STARTDIR)

; Single-User
	EQUAL "" ""
	SAVE 0
; No Copy Workstn
	EQUAL "" ""
	SAVE 5
	EXIST $(SRCDIR)\SchedEng.DLL
	SAVE 1
	GOTO Delete_Extra_Stuff

:Local_Copy
	$(USERDIR) = GETPROFILE $(WINDIR)\Lotus.Ini "Lotus Applications" Organize C:\Organize\Organize.Exe
	$(DESTDIR) = LOOSEFILE $(USERDIR)

	GOTO Get_Dirs

#else
	SETSRCDIR       $(STARTDIR)
	SETDESTDIR      $(STARTDIR)
#endif


#if INSTALL.INF

;
; Ask about installing standalone or scheduling copy
;
	INSTALLSINGLE

#elseif WORKSTN.INF
	EXIST $(SRCDIR)\SchedEng.DLL
#else
	EQUAL "" ""
#endif
	SAVE 0


;
; Get the user to modify the source and destination directories if necessary
;
:Get_Dirs

#if INSTALL.INF
	EXIST $(SRCDIR)\Organize.EYe
#elseif WORKSTN.INF
	EXIST $(SRCDIR)\Organize.Exe
#endif

#if INSTALL.INF or WORKSTN.INF

	IF NO GETSRCDIR Is the Lotus Organizer Install disk in the directory shown below?\rIf Yes, choose OK.\rIf No, retype the path and choose OK.\r\rTo stop installation, choose Cancel or press ESC.

#endif
#if INSTALL.INF or WORKSTN.INF
:Get_Dest_Dir

	GETDESTDIR Type the path where you want to install Lotus Organizer.\r\rChoose OK to continue installation, or Cancel to exit.

	INSTR $(DESTDIR) A:
	IF NO GOTO B_Check
	GOTO Floppy_Question

:B_Check
	INSTR   $(DESTDIR) B:
	IF NO GOTO Done_Floppy_Check

:Floppy_Question
	QUESTION Are you sure you want to install Lotus Organizer in $(DESTDIR)?
	IF NO GOTO Get_Dirs

:Done_Floppy_Check
	EQUALI $(SRCDIR) $(DESTDIR)
	IF NO GOTO Check_Extend

	MESSAGE Cannot copy files to the Install Disk.
	GOTO Get_Dirs
#endif ; install workstation

:Check_Extend
#if INSTALL.INF or WORKSTN.INF
;
; Do this here to check if destination is valid
;
	MKDIR $(DESTDIR)
	EXIST $(DESTDIR)
	IF YES GOTO Finish_Check_Extend
	MESSAGE The installation path you entered is not valid or the directory could not be created.  Please try again.
	GOTO Get_Dest_Dir
:Finish_Check_Extend
#endif



#if UNINSTAL.INF

:Get_Uninstall_Dir
	GETSRCDIR Is Lotus Organizer located in the directory shown below?\rIf Yes, choose OK.\rIf No, retype the path and choose OK.\r\rIf you do not want to remove Lotus Organizer from your hard drive,\rchoose Cancel or press ESC.

	EXIST $(SRCDIR)\Organize.exe
	IF YES GOTO Uninstall_Dir_OK
	MESSAGE The directory $(SRCDIR) does not contain Lotus Organizer.  Please specify a valid Organizer installation directory.
	GOTO Get_Uninstall_Dir

:Uninstall_Dir_OK
	SETDESTDIR $(SRCDIR)

#endif


; Free space

#if INSTALL.INF or WORKSTN.INF

	EXIST $(DESTDIR)\Organize.Exe
	SAVE 4
	IF NO GOTO Sched_and_Space_Check
;
; If there was, ask them if they want to delete it
;
	QUESTION A previous version of the Organizer exists. Do you want to delete it?
	IF YES GOTO Attempt_Old_Delete
	MESSAGE Installation terminated
	GOTO Big_End

:Attempt_Old_Delete
;
;       Attempt to delete Orgdll.dll and then check to see it went, if not 
;       then another workstation may have this file open, so tell the user
;

	DELETE 1 $(DESTDIR)\OrgDll.Dll $(DESTDIR)\OrgDll.Dll -R 1 "Previous Organizer Program"
	EXIST $(DESTDIR)\OrgDll.Dll
	IF NO GOTO Sched_and_Space_Check

	MESSAGE Another user on your network is currently running Lotus Organizer. You need to exit Install, make sure that no one else is running the Organizer, then restart Install.
	GOTO Big_End

#endif


:Sched_and_Space_Check
:Delete_Extra_Stuff
#if INSTALL.INF or WORKSTN.INF
; 
; Delete any random files we previously put in the wrong place
;

	SETINPUTDIR $(WINDIR)
:Delete_PLT
	DELETE 1 $(INPUTDIR)\Org0000.PLT $(INPUTDIR)\Org0000.PLT -R 1 "Previous Organizer Program"
	DELETE 1 $(INPUTDIR)\Org0001.PLT $(INPUTDIR)\Org0001.PLT -R 1 "Previous Organizer Program"
	DELETE 1 $(INPUTDIR)\Org0002.PLT $(INPUTDIR)\Org0002.PLT -R 1 "Previous Organizer Program"
	DELETE 1 $(INPUTDIR)\Org0003.PLT $(INPUTDIR)\Org0003.PLT -R 1 "Previous Organizer Program"
	DELETE 1 $(INPUTDIR)\Org0004.PLT $(INPUTDIR)\Org0004.PLT -R 1 "Previous Organizer Program"
	DELETE 1 $(INPUTDIR)\Org0005.PLT $(INPUTDIR)\Org0005.PLT -R 1 "Previous Organizer Program"
	DELETE 1 $(INPUTDIR)\Org0006.PLT $(INPUTDIR)\Org0006.PLT -R 1 "Previous Organizer Program"
	DELETE 1 $(INPUTDIR)\Org0007.PLT $(INPUTDIR)\Org0007.PLT -R 1 "Previous Organizer Program"
	DELETE 1 $(INPUTDIR)\Org0008.PLT $(INPUTDIR)\Org0008.PLT -R 1 "Previous Organizer Program"
	DELETE 1 $(INPUTDIR)\Org0009.PLT $(INPUTDIR)\Org0009.PLT -R 1 "Previous Organizer Program"
	DELETE 1 $(INPUTDIR)\Org0010.PLT $(INPUTDIR)\Org0010.PLT -R 1 "Previous Organizer Program"
	DELETE 1 $(INPUTDIR)\Org0011.PLT $(INPUTDIR)\Org0011.PLT -R 1 "Previous Organizer Program"
	DELETE 1 $(INPUTDIR)\Org0012.PLT $(INPUTDIR)\Org0012.PLT -R 1 "Previous Organizer Program"
	DELETE 1 $(INPUTDIR)\Org0013.PLT $(INPUTDIR)\Org0013.PLT -R 1 "Previous Organizer Program"
	DELETE 1 $(INPUTDIR)\Org0014.PLT $(INPUTDIR)\Org0014.PLT -R 1 "Previous Organizer Program"
	DELETE 1 $(INPUTDIR)\Org0015.PLT $(INPUTDIR)\Org0015.PLT -R 1 "Previous Organizer Program"
	DELETE 1 $(INPUTDIR)\Org0016.PLT $(INPUTDIR)\Org0016.PLT -R 1 "Previous Organizer Program"
	DELETE 1 $(INPUTDIR)\Org0017.PLT $(INPUTDIR)\Org0017.PLT -R 1 "Previous Organizer Program"
	DELETE 1 $(INPUTDIR)\Org0018.PLT $(INPUTDIR)\Org0018.PLT -R 1 "Previous Organizer Program"
	DELETE 1 $(INPUTDIR)\Org0019.PLT $(INPUTDIR)\Org0019.PLT -R 1 "Previous Organizer Program"
	DELETE 1 $(INPUTDIR)\Org0020.PLT $(INPUTDIR)\Org0020.PLT -R 1 "Previous Organizer Program"
	DELETE 1 $(INPUTDIR)\Org0021.PLT $(INPUTDIR)\Org0021.PLT -R 1 "Previous Organizer Program"
	DELETE 1 $(INPUTDIR)\Org0022.PLT $(INPUTDIR)\Org0022.PLT -R 1 "Previous Organizer Program"
	DELETE 1 $(INPUTDIR)\Org0023.PLT $(INPUTDIR)\Org0023.PLT -R 1 "Previous Organizer Program"
	DELETE 1 $(INPUTDIR)\Org0024.PLT $(INPUTDIR)\Org0024.PLT -R 1 "Previous Organizer Program"
	DELETE 1 $(INPUTDIR)\Org0025.PLT $(INPUTDIR)\Org0025.PLT -R 1 "Previous Organizer Program"
	DELETE 1 $(INPUTDIR)\Org0026.PLT $(INPUTDIR)\Org0026.PLT -R 1 "Previous Organizer Program"
	DELETE 1 $(INPUTDIR)\Org0027.PLT $(INPUTDIR)\Org0027.PLT -R 1 "Previous Organizer Program"
	DELETE 1 $(INPUTDIR)\Org0028.PLT $(INPUTDIR)\Org0028.PLT -R 1 "Previous Organizer Program"
	DELETE 1 $(INPUTDIR)\Org0029.PLT $(INPUTDIR)\Org0029.PLT -R 1 "Previous Organizer Program"
	DELETE 1 $(INPUTDIR)\Org0030.PLT $(INPUTDIR)\Org0030.PLT -R 1 "Previous Organizer Program"
	
; Cheat to save space
	EQUALI $(INPUTDIR) $(DESTDIR)\Printing
	IF YES GOTO Not_In_Printdir
	SETINPUTDIR $(DESTDIR)\Printing
	GOTO Delete_PLT
	
:Not_In_Printdir
	EXIST $(DESTDIR)\Printing
	IF YES RMDIR $(DESTDIR)\Printing


; Jump to bottom if workstn no copy
	RESTORE 5
	IF YES GOTO No_Old_Organizer
#endif

:Real_Space_Check
#if INSTALL.INF
;
; See if they want to install scheduling
;
	RESTORE 0
	IF SERVER GOTO Ask_Question
	EQUAL "" "Not"
	GOTO Done_Asking
:Ask_Question
; If smartsuite, then never do scheduling stuff.
	EXIST $(STARTDIR)\smart.txt
	IF NO GOTO Really_Ask_Question
	EQUAL "" "NOT"
	GOTO Done_Asking
:Really_Ask_Question
	QUESTION Do you want to install Organizer's group scheduling features? (cc:Mail for Windows 1.1 or higher is required.)
#elseif WORKSTN.INF
	EXIST $(SRCDIR)\SchedEng.DLL
#else
	EQUAL "" ""
#endif
:Done_Asking
	SAVE 1

#if INSTALL.INF or WORKSTN.INF
; If scheduling, need lots more space
	RESTORE 1 
	IF YES GOTO Sched_Space_Check
	NEEDSPACE $(DESTDIR) 4000000 "%ld bytes are available on drive %c:. Lotus Organizer requires %ld bytes of disk space. Please select another drive."
	IF NO GOTO Get_Dirs
	GOTO End_Space_Check
#endif
:Sched_Space_Check
#if INSTALL.INF
	NEEDSPACE $(DESTDIR) 7400000 "%ld bytes are available on drive %c:. Lotus Organizer requires %ld bytes of disk space. Please select another drive."
	IF NO GOTO Get_Dirs
#elseif WORKSTN.INF
	NEEDSPACE $(DESTDIR) 5000000 "%ld bytes are available on drive %c:. Lotus Organizer requires %ld bytes of disk space. Please select another drive."
	IF NO GOTO Get_Dirs
#endif
:End_Space_Check

#if INSTALL.INF or WORKSTN.INF
;
; Build the destination directories
;
	MKDIR $(DESTDIR)
	MKDIR $(DESTDIR)\SAMPLE
	MKDIR $(DESTDIR)\ORGFILES

#endif ; install or workstation



#if INSTALL.INF or WORKSTN.INF
; Remove old licensing file
	DELETE 3 $(DESTDIR)\Organizer.v10 $(DESTDIR)\Organizer.v10 -R 1 "Previous Organizer Program"
#endif

#if INSTALL.INF
; Install Version DLL
	RESTORE 0
	IF STANDALONE GOTO Do_StandAlone_Ver
	FILES $(SRCDIR)\Ver.DLL		$(DESTDIR)\Ver.DLL	-R 0 1 "Version DLL"
:Do_StandAlone_Ver
	EXIST $(WINDIR)\Ver.Dll
	IF NO FILES $(SRCDIR)\Ver.DLL		$(WINDIR)\Ver.DLL	-R 0 1 "Version DLL"
#elseif UNINSTAL.INF
	FILES $(SRCDIR)\Ver.DLL		$(DESTDIR)\Ver.DLL	-R 0 1 "Version DLL"
#endif

#if INSTALL.INF

	FILES   $(SRCDIR)\*.plt                                                         $(DESTDIR)\*.plt                                                                -R 1 1 "Paper Layout Files"


#elseif WORKSTN.INF

	FILES $(SRCDIR)\*.PLT   $(DESTDIR)\*.PLT         -R 0 1 "Paper Layout Files"

#elseif UNINSTAL.INF
; Delete from old place just in case
	FILES   $(SRCDIR)\Printing\*.plt                                                         $(SRCDIR)\Printing\*.plt                                                                -R 1 1 "Paper Layout Files"

; Ditto
	FILES $(WINDIR)\*.plt                                            $(WINDIR)\*.plt                                                 -R 1 1 "Paper Layouts"
	FILES   $(SRCDIR)\*.plt                                                         $(SRCDIR)\*.plt                                                                -R 1 1 "Paper Layout Files"
#endif
:End_Of_Print_Files

#if UNINSTAL.INF
	OPENSTATUS	Lotus Organizer Un-Installation
#endif



#if INSTALL.INF
;
; Create Directories only if Scheduling install
;	

; Scheduling being installed?
	RESTORE 1
	IF YES MKDIR $(DESTDIR)\MAILDLLS
#endif


#if WORKSTN.INF or UNINSTAL.INF

; Just copy the drivers that are needed for this user (the ones currently 
; installed.)

	FILES $(SRCDIR)\OrgNet.DLL $(DESTDIR)\OrgNet.DLL     +R 0 1 "Network Driver"

	EXIST $(SRCDIR)\NWCORE.DLL
	IF YES FILES $(SRCDIR)\NW*.DLL                  $(DESTDIR)\NW*.DLL                                              +R 1 1 "Novell 286/386 Netware driver"
; Copy portable.dll so they can take organizer off lan
	FILES $(SRCDIR)\Portable.DLL           $(DESTDIR)\Portable.DLL                                   -R 0 1 "Portable Lan Driver"

#elseif INSTALL.INF
	FILES $(SRCDIR)\Portable\Portable.DLL           $(DESTDIR)\Portable.DLL                                   -R 0 1 "Portable Lan Driver"
;  If we are doing scheduling install, then we'll copy OrgNet later. 
;  Otherwise, install the single user driver.
	RESTORE 0
	IF STANDALONE GOTO Do_Single_User
	RESTORE 1
	IF YES GOTO Dont_Do_Single_User

:Do_Single_User
	FILES $(SRCDIR)\None\None.DLL                                                      $(DESTDIR)\OrgNet.DLL                                   +R 0 1 "Single User Driver"

:Dont_Do_Single_User
#endif


#if UNINSTAL.INF
;
; Determine which extra files need deleting
;
	FILES $(WINDIR)\orgicn.cfg                                                      $(WINDIR)\orgicn.cfg                                            -R 1 1 "SmartIcons Configuration"

	EXIST $(WINDIR)\Organize.Ini
	IF YES QUESTION Do you want to delete your Organizer initialization file (Organize.Ini)?

	IF YES FILES   $(WINDIR)\organize.ini                                          $(WINDIR)\Organize.Ini                                  -R 1 1 "Organizer Defaults"

; Delete these cause they might be left around from previous versions
	FILES   $(DESTDIR)\Organize.V11                                         $(DESTDIR)\Organize.V11                                 -R 1 1 "Licence Information"

	FILES   $(DESTDIR)\Organize.V10                                         $(DESTDIR)\Organize.V10                                 -R 1 1 "Licence Information"

	FILES $(SRCDIR)\NW*.DLL                  $(DESTDIR)\NW*.DLL                                              +R 1 1 "Novell 286/386 Netware driver"

	QUESTION Do you want to delete all files in the $(SRCDIR)\\ORGFILES directory (including all .ORG files)?
	IF YES FILES $(SRCDIR)\ORGFILES\*.*                             $(SRCDIR)\ORGFILES\*.*                                  -R 1 1 "Data Files"

	EXIST $(SRCDIR)\USERS
	IF NO GOTO Skip_Users_Directory
	QUESTION Do you want to delete all files in the $(SRCDIR)\\USERS directory (including all .ORG files)?
	IF YES FILES $(SRCDIR)\USERS\*.*                             $(SRCDIR)\ORGFILES\*.*                                  -R 1 1 "Data Files"

:Skip_Users_Directory

#endif ; uninstall

#if INSTALL.INF
:Non_Network_Files
; Make sure the disk1.dsk file is copied so workstn install works
	RESTORE 0
	IF SERVER FILES $(STARTDIR)\Disk1.dsk                                   $(DESTDIR)\Disk1.dsk                                   -R 1 1 "Disk1"
#elseif UNINSTAL.INF
	FILES $(STARTDIR)\Disk1.dsk                                   $(DESTDIR)\Disk1.dsk                                   -R 1 1 "Disk1"	
#endif
#if INSTALL.INF or WORKSTN.INF or UNINSTAL.INF
	FILES $(SRCDIR)\Organize.Exe                                            $(DESTDIR)\Organize.Exe                                         -R 1 1 "Lotus Organizer Program"
	FILES $(SRCDIR)\OrgDll.Dll                                              $(DESTDIR)\OrgDll.Dll                                           -R 1 1 "Lotus Organizer Program"

	FILES $(SRCDIR)\TzDll.Dll                                                       $(DESTDIR)\TzDll.Dll                                                    -R 1 1 "Lotus Organizer Library"
;	FILES $(SRCDIR)\l1wnet.dll                                                      $(DESTDIR)\l1wnet.dll                                           -R 1 1 "Lotus Organizer Library"
	FILES $(STARTDIR)\ivcw.dll                                                      $(DESTDIR)\ivcw.dll                                                     -R 1 1 "Lotus Organizer Library"
	FILES $(SRCDIR)\OrgUtils.Exe                                            $(DESTDIR)\OrgUtils.Exe                                         -R 1 1 "Lotus Organizer Utilities"
	FILES $(SRCDIR)\Organize.Ini                                            $(DESTDIR)\Organize.Ini                                         -R 1 1 "Lotus Organizer Defaults"
	FILES $(STARTDIR)\Org_IR.DLL                                            $(DESTDIR)\Org_IR.DLL                                           -R 1 1 "Lotus Organizer Defaults"

	FILES $(SRCDIR)\ltsicn01.dll                                            $(DESTDIR)\ltsicn01.dll                                         -R 0 1 "SmartIcons Manager"
	FILES $(SRCDIR)\orgicn8.dll                                             $(DESTDIR)\orgicn8.dll                                          -R 0 1 "8514 SmartIcons"
	FILES $(SRCDIR)\orgicnv.dll                                             $(DESTDIR)\orgicnv.dll                                          -R 0 1 "VGA SmartIcons"
	FILES $(SRCDIR)\orgicn.cfg                                                      $(DESTDIR)\orgicn.cfg                                           -R 1 1 "SmartIcons Configuration"

	FILES $(SRCDIR)\Organize.Hlp                                            $(DESTDIR)\Organize.Hlp                                         -R 1 1 "Help File"
	FILES $(SRCDIR)\TZAFont.Dll                                             $(DESTDIR)\TZAFont.Dll                                          -R 0 1 "Font Files"
	FILES $(SRCDIR)\TZBFont.Dll                                             $(DESTDIR)\TZBFont.Dll                                          -R 0 1 "Font Files"
#endif 


; always install the Uninstall program except for Server install cause
; it's already there
#if INSTALL.INF
; install from names on disk
	FILES $(STARTDIR)\Install.Bin                                            $(DESTDIR)\UnInstal.Exe                                         -R 1 1 "UnInstall Program"
	FILES $(STARTDIR)\Install.Inf                                            $(DESTDIR)\Install.Inf                                         -R 1 1 "UnInstall Script"
#elseif WORKSTN.INF
; install from names in install area
	FILES $(STARTDIR)\UnInstal.Exe                                            $(DESTDIR)\UnInstal.Exe                                         -R 1 1 "UnInstall Program"
	FILES $(STARTDIR)\Install.Inf                                            $(DESTDIR)\Install.Inf                                         -R 1 1 "UnInstall Script"
#endif


#if UNINSTAL.INF
	FILES $(STARTDIR)\Install.Bin                                            $(DESTDIR)\Workstn.Exe                                          -R 1 1 "Workstation Install Program"

	FILES $(STARTDIR)\Install.Bin                                            $(DESTDIR)\Install.Bin                                          -R 0 1 "Workstation Install Program"
#endif


#if INSTALL.INF

	RESTORE 0
	IF STANDALONE GOTO Skip_Install2_Set
	FILES $(STARTDIR)\Install.Bin                                            $(DESTDIR)\Workstn.Exe                                          -R 0 1 "Workstation Install Program"

	FILES $(STARTDIR)\UnArjw.Dll                                            $(DESTDIR)\UnArjw.Dll                                          -R 0 1 "Workstation Install Program"

	RESTORE 1
	IF YES FILES $(STARTDIR)\Install.Bin                                            $(DESTDIR)\SetupDir.Exe                                          -R 0 1 "Directory Install Program"

#elseif UNINSTAL.INF
	FILES $(STARTDIR)\Install.Bin                                            $(DESTDIR)\Workstn.Exe                                          -R 0 0 "Workstation Install Program"

	FILES $(STARTDIR)\Install.Bin                                            $(DESTDIR)\SetupDir.Exe                                          -R 0 1 "Directory Install Program"

#elseif WORKSTN.INF

; Needed to run uninstal.exe
	FILES $(STARTDIR)\UnArjw.Dll                                            $(DESTDIR)\UnArjw.Dll                                          -R 0 1 "Workstation Install Program"

#endif
:Skip_Install2_Set

#if INSTALL.INF or WORKSTN.INF or UNINSTAL.INF

	FILES $(STARTDIR)\Readme.Txt                                            $(DESTDIR)\ReadMe.Txt                                           -R 0 1 "Release Notes"

	FILES $(STARTDIR)\Tips.Txt                                            $(DESTDIR)\Tips.Txt                                           -R 0 1 "Release Notes"

#endif

#if INSTALL.INF or WORKSTN.INF or UNINSTAL.INF

;
; Sample files
;
	FILES   $(SRCDIR)\SAMPLE\address.CSV                                          $(DESTDIR)\SAMPLE\address.CSV                                         -R 0 1 "Sample Files"

	FILES   $(SRCDIR)\SAMPLE\addrflds.CSV                                          $(DESTDIR)\SAMPLE\addrflds.CSV                                         -R 0 1 "Sample Files"

	FILES   $(SRCDIR)\SAMPLE\addrwp.CSV                                          $(DESTDIR)\SAMPLE\addrwp.CSV                                         -R 0 1 "Sample Files"

	FILES   $(SRCDIR)\SAMPLE\Almanac.Org                                          $(DESTDIR)\SAMPLE\Almanac.Org                                         -R 0 1 "Sample Files"
	
	FILES   $(SRCDIR)\SAMPLE\sample.BMP                                          $(DESTDIR)\SAMPLE\sample.BMP                                         -R 0 1 "Sample Files"

	FILES   $(SRCDIR)\SAMPLE\sample.ORG                                          $(DESTDIR)\SAMPLE\sample.ORG                                         -R 0 1 "Sample Files"

	FILES   $(SRCDIR)\SAMPLE\ABC.ORG                                          $(DESTDIR)\SAMPLE\ABC.ORG                                         -R 0 1 "Sample Files"

	FILES   $(SRCDIR)\SAMPLE\mailmrg.DOC                                          $(DESTDIR)\SAMPLE\mailmrg.DOC                                         -R 0 1 "Sample Files"

	FILES   $(SRCDIR)\SAMPLE\descript.SAM                                          $(DESTDIR)\SAMPLE\descript.SAM                                         -R 0 1 "Sample Files"

	FILES   $(SRCDIR)\SAMPLE\mailmrg.SAM                                          $(DESTDIR)\SAMPLE\mailmrg.SAM                                         -R 0 1 "Sample Files"


	FILES   $(SRCDIR)\SAMPLE\Sample.WK3                                          $(DESTDIR)\SAMPLE\Sample.WK3                                         -R 0 1 "Sample Files"

	FILES   $(SRCDIR)\SAMPLE\layout.WMF                                          $(DESTDIR)\SAMPLE\layout.WMF                                         -R 0 1 "Sample Files"

	FILES   $(SRCDIR)\SAMPLE\Address.TXT                                          $(DESTDIR)\SAMPLE\Address.TXT                                         -R 0 1 "Sample Files"

	FILES   $(SRCDIR)\SAMPLE\MailMrg.WP                                           $(DESTDIR)\SAMPLE\MailMrg.WP                                          -R 0 1 "Sample Files"

#endif


#if INSTALL.INF
; So that workstation install will work later when copying disk2 files.
; Was Scheduling installed?
	RESTORE 1
	IF YES FILES $(STARTDIR)\Disk2.dsk	$(DESTDIR)\Disk2.dsk	-R 1 2 "Disk2"
#elseif UNINSTAL.INf
	FILES $(STARTDIR)\Disk2.dsk	$(DESTDIR)\Disk2.dsk	-R 1 2 "Disk2"
#endif


#if INSTALL.INF
;
; No FILE commands should be before this, or if they are, the should not have
; first argument of 0.   Otherwise, user will have to swap disks unecessarily.
;

; Doing Scheduling?
	RESTORE 1
	IF NO GOTO No_Network_Stuff

;	FILES $(SRCDIR)\None\None.DLL                                   $(DESTDIR)\OrgNet.DLL                                   -R 16 2 "No Network"

	FILES $(SRCDIR)\MSNet\MsNet.DLL                         $(DESTDIR)\OrgNet.DLL                                   -R 16 2 "MS-NET or 100% compatible"
	FILES $(SRCDIR)\MSNet\MsNet.DLL                         $(DESTDIR)\OrgNet.DLL                                   -R 16 2 "Banyan (MS-NET)"
	FILES $(SRCDIR)\MSNet\MsNet.DLL                         $(DESTDIR)\OrgNet.DLL                                   -R 16 2 "Lan Manager 1.x or 2.0 Basic"
	FILES $(SRCDIR)\LanMan\LanMan.DLL                       $(DESTDIR)\OrgNet.DLL                                   -R 16 2 "Lan Manager 2.0 Enhanced"
	FILES $(SRCDIR)\MsNet\MsNet.DLL                       $(DESTDIR)\OrgNet.DLL                                   -R 16 2 "Lan Server 3.0"
	FILES $(SRCDIR)\NetWare\NetWare.DLL                     $(DESTDIR)\OrgNet.DLL                                   -R 16 2 "Novell Netware 286/386"
	FILES $(SRCDIR)\NetWare\NWBIND.DLL                         $(DESTDIR)\NWBIND.DLL                                              -R 16 2 "Novell Netware 286/386"
	FILES $(SRCDIR)\NetWare\NWCONN.DLL                         $(DESTDIR)\NWCONN.DLL                                              -R 16 2 "Novell Netware 286/386"
	FILES $(SRCDIR)\NetWare\NWCORE.DLL                         $(DESTDIR)\NWCORE.DLL                                              -R 16 2 "Novell Netware 286/386"
	FILES $(SRCDIR)\NetWare\NWDIR.DLL                         $(DESTDIR)\NWDIR.DLL                                              -R 16 2 "Novell Netware 286/386"
	FILES $(SRCDIR)\NetWare\NWMISC.DLL                         $(DESTDIR)\NWMISC.DLL                                              -R 16 2 "Novell Netware 286/386"
	FILES $(SRCDIR)\NetWare\NWSERVER.DLL                         $(DESTDIR)\NWSERVER.DLL                                              -R 16 2 "Novell Netware 286/386"
	FILES $(SRCDIR)\NetWare\NWWRKSTN.DLL                         $(DESTDIR)\NWWRKSTN.DLL                                              -R 16 2 "Novell Netware 286/386"
	FILES $(SRCDIR)\MSNet\MSNet.DLL                         $(DESTDIR)\OrgNet.DLL                                   -R 16 2 "Novell Netware Lite"
	FILES $(SRCDIR)\MSNet\MSNet.DLL                         $(DESTDIR)\OrgNet.DLL                                   -R 16 2 "DEC 10Net"
	FILES $(SRCDIR)\Pathwork\PathWork.DLL           $(DESTDIR)\OrgNet.DLL                                   -R 16 2 "Pathworks"
	FILES $(SRCDIR)\MSNet\MSNet.DLL                         $(DESTDIR)\OrgNet.DLL                                   -R 16 2 "IBM PC Lan"
	FILES $(SRCDIR)\MSNet\MSNet.DLL                         $(DESTDIR)\OrgNet.DLL                                   -R 16 2 "LANTastic"
	FILES $(SRCDIR)\MSNet\MSNet.DLL                         $(DESTDIR)\OrgNet.DLL                                   -R 16 2 "Torus"
	FILES $(SRCDIR)\Demo\Demo.DLL                                   $(DESTDIR)\OrgNet.DLL                                   -R 16 2 "Demo Lan"
	FILES $(SRCDIR)\Portable\Portable.DLL           $(DESTDIR)\OrgNet.DLL                                   -R 16 2 "Portable Lan"

	CHOOSE 16 "Select which network driver you want to install"
:No_Network_Stuff
#endif

#if WORKSTN.INF
; Don't copy these if they weren't installed.

	EXIST $(SRCDIR)\SchedEng.Dll
	IF NO GOTO Skip_SchedEng
#endif

#if UNINSTAL.INF
; Leftover from previous version	
	FILES $(SRCDIR)\SchedEng.Sys $(DESTDIR)\SchedEng.Sys -R 1 2 "Scheduling Engine"
#endif


#if INSTALL.INF or WORKSTN.INF

; Scheduling?
	RESTORE 1
	IF NO GOTO Skip_SchedEng
#endif
#if INSTALL.INF or WORKSTN.INF or UNINSTAL.INF
; Scheduling Engine
	FILES $(SRCDIR)\SchedEng.Dll $(DESTDIR)\SchedEng.Dll    -R 1 2 "Scheduling Engine"
	FILES $(SRCDIR)\SchedEng.ri $(DESTDIR)\SchedEng.ri    -R 1 2 "Scheduling Engine"
#endif
#if INSTALL.INF or UNINSTAL.INF
; VIM files
	FILES $(SRCDIR)\MailDLLs\CharSet.Dll	$(DESTDIR)\MailDLLs\CharSet.Dll     -R 1 2 "VIM Libraries"
	FILES $(SRCDIR)\MailDLLs\MailEng.Dll	$(DESTDIR)\MailDLLs\MailEng.Dll     -R 1 2 "VIM Libraries"
	FILES $(SRCDIR)\MailDLLs\MemMan.Dll	$(DESTDIR)\MailDLLs\MemMan.Dll      -R 1 2 "VIM Libraries"
	FILES $(SRCDIR)\MailDLLs\VIM.Dll	$(DESTDIR)\MailDLLs\VIM.Dll         -R 1 2 "VIM Libraries"
	FILES $(SRCDIR)\MailDLLs\CCEDIT.Dll	$(DESTDIR)\MailDLLs\CCEDIT.Dll         -R 1 2 "VIM Libraries"
	FILES $(SRCDIR)\MailDLLs\CCUTIL.Dll	$(DESTDIR)\MailDLLs\CCUTIL.Dll         -R 1 2 "VIM Libraries"
	FILES $(SRCDIR)\MailDLLs\CCSMI.Dll	$(DESTDIR)\MailDLLs\CCSMI.Dll         -R 1 2 "VIM Libraries"
	FILES $(SRCDIR)\MailDLLs\CDVIM.Dll	$(DESTDIR)\MailDLLs\CDVIM.Dll         -R 1 2 "VIM Libraries"
	FILES $(SRCDIR)\MailDLLs\SMI.Dll	$(DESTDIR)\MailDLLs\SMI.Dll         -R 1 2 "VIM Libraries"

#endif
:Skip_SchedEng


#if INSTALL.INF
;
; Ask user where to put users directory
;
	RESTORE 1
	IF NO GOTO Skip_UserDir_Stuff

:UserDir_Again
	SETORGDBDIR $(DESTDIR)\Users
	$(ORGDBDIR) = GETDIR Type the path where the users' Organizer (.ORG) files will be stored.
	IF NO GOTO Big_End
	MKDIR $(ORGDBDIR)
	EXIST $(ORGDBDIR)
	IF NO MESSAGE Directory $(ORGDBDIR) does not exist or could not be created.  Please try again.

	IF NO GOTO UserDir_Again

:Skip_UserDir_Stuff
#endif


;
; Copy administrator type stuff.
;
#if INSTALL.INF

	RESTORE 1
	IF NO GOTO Skip_Admin_Stuff

:Do_Admin_Dir
	SETUSERDIR $(DESTDIR)\Admin
	$(USERDIR) = GETDIR Where do you wish to install the Organizer administration tools (DIRADMIN, SRVADMIN, AGENT, PWDADMIN)?
	IF NO GOTO Big_End
	
	MKDIR $(USERDIR)
	EXIST $(USERDIR)
	IF NO MESSAGE Directory $(USERDIR) does not exist or could not be created.  Please try again.
	IF NO GOTO Do_Admin_Dir

#endif
#if INSTALL.INF
	FILES   $(SRCDIR)\SrvAdmin.exe  $(USERDIR)\DirAdmin.exe -R 1 2 "Directory Administration"
	FILES 	$(SRCDIR)\diradmin.pif	$(WINDIR)\diradmin.pif -R 0 2 "Directory Administration"
	FILES   $(SRCDIR)\OrgAdmin.ri	$(USERDIR)\OrgAdmin.ri -R 1 2 "Directory Administration"
	FILES   $(SRCDIR)\SrvAdmin.exe  $(USERDIR)\SrvAdmin.exe -R 1 2 "Server Administration"
	FILES   $(SRCDIR)\SrvAdmin.exe  $(USERDIR)\PwdAdmin.exe -R 1 2 "Password Administration"
	FILES   $(SRCDIR)\Agent.exe     $(USERDIR)\Agent.exe -R 1 2 "Scheduling Agent"
	FILES   $(SRCDIR)\Agent.ri	$(USERDIR)\Agent.ri -R 1 2 "Scheduling Agent"
	FILES   $(SRCDIR)\VIMMsg.ri     $(USERDIR)\VIMMsg.ri -R 1 2 "Scheduling Agent"

:Skip_Admin_Stuff
#elseif UNINSTAL.INF
; These could by anywhere, but we'll guess that they are in Admin directory
	FILES   $(SRCDIR)\SrvAdmin.exe  $(DESTDIR)\Admin\DirAdmin.exe -R 1 2 "Directory Administration"
	FILES 	$(SRCDIR)\diradmin.pif	$(WINDIR)\diradmin.pif -R 0 2 "Directory Administration"
	FILES   $(SRCDIR)\diradmin.log     $(DESTDIR)\Admin\diradmin.log -R 1 2 "Directory Administration"
	FILES   $(SRCDIR)\diradmin.err     $(DESTDIR)\Admin\diradmin.err -R 1 2 "Directory Administration"
	FILES   $(SRCDIR)\OrgAdmin.ri	$(DESTDIR)\Admin\OrgAdmin.ri -R 1 2 "Directory Administration"
	FILES   $(SRCDIR)\SrvAdmin.exe  $(DESTDIR)\Admin\SrvAdmin.exe -R 1 2 "Server Administration"
	FILES   $(SRCDIR)\PwdAdmin.exe  $(DESTDIR)\Admin\PwdAdmin.exe -R 1 2 "Password Administration"
	FILES   $(SRCDIR)\Agent.exe     $(DESTDIR)\Admin\Agent.exe -R 1 2 "Scheduling Agent"
	FILES   $(SRCDIR)\Agent.ri	$(DESTDIR)\Admin\Agent.ri -R 1 2 "Scheduling Agent"
	FILES   $(SRCDIR)\VIMMsg.ri     $(DESTDIR)\Admin\VIMMsg.ri -R 1 2 "Scheduling Agent"

#endif

#if UNINSTAL.INF
;
; Delete UNINSTAL.exe last in case they hit exit before finishing
;
	FILES $(STARTDIR)\UnInstal.Exe                                            $(DESTDIR)\UnInstal.Exe                                         -R 1 1 "UnInstall Program"
	FILES $(STARTDIR)\Install.Inf                                            $(DESTDIR)\Install.Inf                                         -R 1 1 "UnInstall Script"
	FILES $(STARTDIR)\UnArjw.Dll                                            $(DESTDIR)\UnArjw.Dll                                          -R 0 0 "Workstation Install Program"

#endif

;
;; ALL FILES COMMANDS ABOVE THIS;;
;

#if INSTALL.INF or WORKSTN.INF
	OPENSTATUS      Lotus Organizer Installation
#endif

;
; Check to see if there was an old version of Lotus Organizer around
; Use a different file then the one we used way up above because we deleted
; that one.
; 
#if INSTALL.INF or WORKSTN.INF
	EXIST $(DESTDIR)\Organize.Exe
#else
	EQUAL "" ""
#endif
	IF NO GOTO No_Old_Organizer

;
; Delete the old version of the software
;
:Delete_Old
	DELETEFILES

:No_Old_Organizer

;
; Perform the installation
;

#if INSTALL.INF
; we serialize only when doing main install
;	
	SERIALIZE $(STARTDIR)\Org_ir.Dll
#endif


#ifn UNINSTAL.INF
	EXPANDFILES

#endif

#if INSTALL.INF or UNINSTAL.INF or WORKSTN.INF

	STATUSPERCENT 100
	CLOSESTATUS

#endif

;
; Do this here because we've now copied the files to disk
;
:Do_VIM_Things

#if INSTALL.INF or WORKSTN.INF

; 
; Copy VIM and mailengine DLL's if appropriate
;
	$(PATHDIR) = GETPROFILE $(WINDIR)\WIN.INI "cc:Mail" ProgramPath ""
#else
	GOTO No_VIM_Updates
#endif
#if WORKSTN.INF
; If they don't seem to have cc:Mail installed, don't even bother trying to 
; update their VIM dlls
	EQUAL $(PATHDIR) ""
	IF YES GOTO No_VIM_Updates
#endif

#if WORKSTN.INF
; Make sure userdir is set to where we want updvim.bat to go
	SETUSERDIR $(PATHDIR)
#endif

#if INSTALL.INF or WORKSTN.INF
; Scheduling?
	RESTORE 1
	IF NO GOTO No_VIM_Updates

	RESETFILES
#else
	GOTO No_VIM_Updates
#endif

:Check_ccmail_Path
#if INSTALL.INF
	GETPATH Install checks the versions of your cc:Mail DLLs (Dynamic Link Libraries) to ensure that the Organizer and cc:Mail can work together correctly.  Make sure that the path to your current cc:Mail program is correctly listed below.
#elseif WORKSTN.INF
	GETPATH To ensure that the Organizer and cc:Mail work together correctly, Install must access your cc:Mail program directory. Make sure that this is the correct path.
#endif

#if INSTALL.INF or WORKSTN.INF
	
; They want to skip this
	IF NO GOTO No_VIM_Updates

	EXIST $(PATHDIR)
	IF YES GOTO Continue_VIM_Updates
	MESSAGE The directory you entered does not exist.  Please specify a valid path to your cc:Mail program directory.
	GOTO Check_ccmail_Path
:Continue_VIM_Updates

	OPENSTATUS      Lotus Organizer Installation

; If any DLLs in the existing directory are newer, then don't copy any DLLs
; But, if any are missing, then update all of them

	STATUS Checking VIM DLL Versions
#endif

; This is so we don't have to copy MailDLL directory for workstn install
#if INSTALL.INF
	SETINPUTDIR	$(DESTDIR)
#elseif WORKSTN.INF
	SETINPUTDIR	$(SRCDIR)
#endif

#if INSTALL.INF or WORKSTN.INF	
; INPUTDIR must be set before this

	STATUSPERCENT 0
	NEWERDLL2 $(PATHDIR)\MAILENG.DLL $(INPUTDIR)\MailDLLs\MAILENG.DLL
	IF YES GOTO No_VIM_Updates
	STATUSPERCENT 5
	NEWERDLL2 $(PATHDIR)\MEMMAN.DLL	$(INPUTDIR)\MailDLLs\MEMMAN.DLL
	IF YES GOTO No_VIM_Updates
	STATUSPERCENT 10
	NEWERDLL2 $(PATHDIR)\CHARSET.DLL $(INPUTDIR)\MailDLLs\CHARSET.DLL
	IF YES GOTO No_VIM_Updates
	STATUSPERCENT 15
	NEWERDLL2 $(PATHDIR)\VIM.DLL	$(INPUTDIR)\MailDLLs\VIM.DLL
	IF YES GOTO No_VIM_Updates
	STATUSPERCENT 20
	NEWERDLL2 $(PATHDIR)\CCEDIT.DLL	$(INPUTDIR)\MailDLLs\CCEDIT.DLL
	IF YES GOTO No_VIM_Updates
	STATUSPERCENT 25
	NEWERDLL2 $(PATHDIR)\CCUTIL.DLL	$(INPUTDIR)\MailDLLs\CCUTIL.DLL
	IF YES GOTO No_VIM_Updates
	STATUSPERCENT 30
	NEWERDLL2 $(PATHDIR)\CCSMI.DLL	$(INPUTDIR)\MailDLLs\CCSMI.DLL
	IF YES GOTO No_VIM_Updates
	STATUSPERCENT 35
	NEWERDLL2 $(PATHDIR)\CDVIM.DLL	$(INPUTDIR)\MailDLLs\CDVIM.DLL
	IF YES GOTO No_VIM_Updates
	STATUSPERCENT 40
	NEWERDLL2 $(PATHDIR)\SMI.DLL	$(INPUTDIR)\MailDLLs\SMI.DLL
	IF YES GOTO No_VIM_Updates
	STATUSPERCENT 45

; If any of our DLLs are newer than the ones in the existing directory, then 
; copy them.

	NEWERDLL $(INPUTDIR)\MailDLLs\MEMMAN.DLL	$(PATHDIR)\MEMMAN.DLL
	IF YES GOTO DO_VIM_Updates
	STATUSPERCENT 50
	NEWERDLL $(INPUTDIR)\MailDLLs\MAILENG.DLL	$(PATHDIR)\MAILENG.DLL
	IF YES GOTO DO_VIM_Updates
	STATUSPERCENT 55
	NEWERDLL $(INPUTDIR)\MailDLLs\CHARSET.DLL	$(PATHDIR)\CHARSET.DLL
	IF YES GOTO DO_VIM_Updates
	STATUSPERCENT 60
	NEWERDLL $(INPUTDIR)\MailDLLs\VIM.DLL	$(PATHDIR)\VIM.DLL	
	IF YES GOTO DO_VIM_Updates
	STATUSPERCENT 65
	NEWERDLL $(INPUTDIR)\MailDLLs\CCEDIT.DLL	$(PATHDIR)\CCEDIT.DLL
	IF YES GOTO DO_VIM_Updates
	STATUSPERCENT 70
	NEWERDLL $(INPUTDIR)\MailDLLs\CCUTIL.DLL	$(PATHDIR)\CCUTIL.DLL
	IF YES GOTO DO_VIM_Updates
	STATUSPERCENT 75
	NEWERDLL $(INPUTDIR)\MailDLLs\CCSMI.DLL	$(PATHDIR)\CCSMI.DLL	
	IF YES GOTO DO_VIM_Updates
	STATUSPERCENT 80
	NEWERDLL $(INPUTDIR)\MailDLLs\CDVIM.DLL	$(PATHDIR)\CDVIM.DLL	
	IF YES GOTO DO_VIM_Updates
	STATUSPERCENT 85
	NEWERDLL $(INPUTDIR)\MailDLLs\SMI.DLL	$(PATHDIR)\SMI.DLL	
	IF YES GOTO DO_VIM_Updates
	STATUSPERCENT 95

	GOTO No_VIM_Updates

:DO_VIM_Updates
	STATUSPERCENT 100
#endif
#if INSTALL.INF

	QUESTION You must update the cc:Mail DLLs and your post office may need to be shut down to do this.\r\rIf your post office is not shutdown, you can\r      Exit Install, shut down the post office and\r      restart Install\ror\r      Continue Install, and if instructed to,\r      shut down the post office later and\r      run UPDVIM.BAT in the\r      $(USERDIR) directory\r      to update the DLLs.\r\rContinue the install?
	IF NO GOTO Big_End

#elseif WORKSTN.INF
	ISLOCALDRIVE	$(PATHDIR)
	IF NO MESSAGE The cc:Mail DLLs in the network directory $(PATHDIR) are out of date.  Please contact your administrator to update them to the newest versions.
	IF YES MESSAGE You must update the cc:Mail DLLs and cc:Mail must not be running to do this.  If cc:Mail is currently running, switch to it and exit cc:Mail before continuing the installation.

	IF NO GOTO No_VIM_Updates
#endif
#if INSTALL.INF or WORKSTN.INF

	DELETE 5 $(USERDIR)\UPDVIM.BAT $(USERDIR)\UPDVIM.BAT -R 1 "VIM Batch File"
	EQUAL "" "NOT"
	SAVE 3

;
; mail engine section
;

	NEWERDLL $(INPUTDIR)\MailDLLs\MAILENG.DLL $(PATHDIR)\MAILENG.DLL
	IF NO GOTO ME_NoCopy

	EXIST $(PATHDIR)\MAILENG.DLL
	IF NO GOTO ME_Copy

	DELETE 7 $(PATHDIR)\MAILENG.OLD $(PATHDIR)\MAILENG.OLD -R 1 "MailEngine Libraries"
	RENAME 10 $(PATHDIR)\MAILENG.DLL $(PATHDIR)\MAILENG.OLD -R 0 "Mail Engine Libraries"

	EXIST $(PATHDIR)\MAILENG.DLL
	IF YES GOTO ME_Append
:ME_Copy

	EXPAND 15 $(INPUTDIR)\MailDLLs\MAILENG.DLL $(PATHDIR)\MAILENG.DLL +R 0 "Mail Engine Libraries" 2
:ME_Append
	EXIST $(PATHDIR)\MAILENG.DLL
	IF YES GOTO ME_NoCopy

:ME_Append

	RESTORE 3
	IF NO MESSAGE Unable to update the cc:Mail DLLs.  After you finish the installation, be sure to shutdown your postoffice and run\r$(USERDIR)\UPDVIM.BAT.
	EQUAL "" ""
	SAVE 3
	APPEND $(USERDIR)\UPDVIM.BAT "COPY $(INPUTDIR)\MailDLLs\MAILENG.DLL $(PATHDIR)\MAILENG.DLL"
:ME_NoCopy


;
; memory manager section
;

	RESTORE 3
	IF YES GOTO MEM_Append
	NEWERDLL  $(INPUTDIR)\MailDLLs\MEMMAN.DLL $(PATHDIR)\MEMMAN.DLL
	IF NO GOTO MEM_NoCopy

	EXIST $(PATHDIR)\MEMMAN.DLL
	IF NO GOTO MEM_Copy

	DELETE 17 $(PATHDIR)\MEMMAN.OLD $(PATHDIR)\MEMMAN.OLD -R 1 "MailEngine Libraries"
	RENAME 20 $(PATHDIR)\MEMMAN.DLL $(PATHDIR)\MEMMAN.OLD -R 0  "Mail Engine Libraries"

	EXIST $(PATHDIR)\MEMMAN.DLL
	IF YES GOTO MEM_Append
:MEM_Copy

	EXPAND 25 $(INPUTDIR)\MailDLLs\MEMMAN.DLL $(PATHDIR)\MEMMAN.DLL +R 0 "Mail Engine Libraries" 2
	EXIST $(PATHDIR)\MEMMAN.DLL
	IF YES GOTO MEM_NoCopy

:MEM_Append
	
	RESTORE 3
	IF NO MESSAGE Unable to update the cc:Mail DLLs.  After you finish the installation, be sure to shutdown your postoffice and run $(USERDIR)\UPDVIM.BAT.
	EQUAL "" ""
	SAVE 3
	APPEND $(USERDIR)\UPDVIM.BAT "COPY $(INPUTDIR)\MailDLLs\MEMMAN.DLL $(PATHDIR)\MEMMAN.DLL"

:MEM_NoCopy

;
; character set section
;

	RESTORE 3
	IF YES GOTO CHAR_Append
	NEWERDLL   $(INPUTDIR)\MailDLLs\CHARSET.DLL $(PATHDIR)\CHARSET.DLL
	IF NO GOTO CHAR_NoCopy

	EXIST $(PATHDIR)\CHARSET.DLL
	IF NO GOTO CHAR_Copy

	DELETE 27 $(PATHDIR)\CHARSET.OLD $(PATHDIR)\CHARSET.OLD -R 1 "MailEngine Libraries"
	RENAME 30 $(PATHDIR)\CHARSET.DLL $(PATHDIR)\CHARSET.OLD -R 0 "Mail Engine Libraries"

	EXIST $(PATHDIR)\CHARSET.DLL
	IF YES GOTO CHAR_Append

:CHAR_Copy
	EXPAND 35 $(INPUTDIR)\MailDLLs\CHARSET.DLL $(PATHDIR)\CHARSET.DLL +R 0 "Mail Engine Libraries" 2
	EXIST $(PATHDIR)\CHARSET.DLL
	IF YES GOTO CHAR_NoCopy

:CHAR_Append
	
	RESTORE 3
	IF NO MESSAGE Unable to update the cc:Mail DLLs.  After you finish the installation, be sure to shutdown your postoffice and run $(USERDIR)\UPDVIM.BAT.
	EQUAL "" ""
	SAVE 3
	APPEND $(USERDIR)\UPDVIM.BAT "COPY $(INPUTDIR)\MailDLLs\CHARSET.DLL $(PATHDIR)\CHARSET.DLL"


:CHAR_NoCopy

;
; vim
;
	RESTORE 3
	IF YES GOTO VIM_Append
	NEWERDLL $(INPUTDIR)\MailDLLs\VIM.DLL $(PATHDIR)\VIM.DLL
	IF NO GOTO VIM_NoCopy

	EXIST $(PATHDIR)\VIM.DLL
	IF NO GOTO VIM_Copy

	DELETE 37 $(PATHDIR)\VIM.OLD $(PATHDIR)\VIM.OLD -R 1 "VIM Library"
	RENAME 40 $(PATHDIR)\VIM.DLL $(PATHDIR)\VIM.OLD -R 0 "VIM Library"

	EXIST $(PATHDIR)\VIM.DLL
	IF YES GOTO VIM_Append

:VIM_Copy

	EXPAND 45 $(INPUTDIR)\MailDLLs\VIM.DLL $(PATHDIR)\VIM.DLL +R 0 "VIM Library" 2
	EXIST $(PATHDIR)\VIM.DLL
	IF YES GOTO VIM_NoCopy

:VIM_Append
	
	RESTORE 3
	IF NO MESSAGE Unable to update the cc:Mail DLLs.  After you finish the installation, be sure to shutdown your postoffice and run $(USERDIR)\UPDVIM.BAT.
	EQUAL "" ""
	SAVE 3
	APPEND $(USERDIR)\UPDVIM.BAT "COPY $(INPUTDIR)\MailDLLs\VIM.DLL $(PATHDIR)\VIM.DLL"

:VIM_NoCopy


;
; ccedit
;
	RESTORE 3
	IF YES GOTO CCEDIT_Append
	NEWERDLL $(INPUTDIR)\MailDLLs\CCEDIT.DLL $(PATHDIR)\CCEDIT.DLL
	IF NO GOTO CCEDIT_NoCopy

	EXIST $(PATHDIR)\CCEDIT.DLL
	IF NO GOTO CCEDIT_Copy

	DELETE 47 $(PATHDIR)\CCEDIT.OLD $(PATHDIR)\CCEDIT.OLD -R 1 "VIM Library"
	RENAME 50 $(PATHDIR)\CCEDIT.DLL $(PATHDIR)\CCEDIT.OLD -R 0 "VIM Library"
	EXIST $(PATHDIR)\CCEDIT.DLL
	IF YES GOTO CCEDIT_Append

:CCEDIT_Copy

	EXPAND 55 $(INPUTDIR)\MailDLLs\CCEDIT.DLL $(PATHDIR)\CCEDIT.DLL +R 0 "VIM Library" 2

	EXIST $(PATHDIR)\CCEDIT.DLL
	IF YES GOTO CCEDIT_NoCopy

:CCEDIT_Append
	
	RESTORE 3
	IF NO MESSAGE Unable to update the cc:Mail DLLs.  After you finish the installation, be sure to shutdown your postoffice and run $(USERDIR)\UPDVIM.BAT.
	EQUAL "" ""
	SAVE 3
	APPEND $(USERDIR)\UPDVIM.BAT "COPY $(INPUTDIR)\MailDLLs\CCEDIT.DLL $(PATHDIR)\CCEDIT.DLL"

:CCEDIT_NoCopy


;
; ccutil
;
	RESTORE 3
	IF YES GOTO ccutil_Append
	NEWERDLL $(INPUTDIR)\MailDLLs\ccutil.DLL $(PATHDIR)\ccutil.DLL
	IF NO GOTO ccutil_NoCopy

	EXIST $(PATHDIR)\ccutil.DLL
	IF NO GOTO ccutil_Copy

	DELETE 57 $(PATHDIR)\CCUTIL.OLD $(PATHDIR)\CCUTIL.OLD -R 1 "VIM Library"
	RENAME 60 $(PATHDIR)\ccutil.DLL $(PATHDIR)\ccutil.OLD -R 0 "VIM Library"
	EXIST $(PATHDIR)\ccutil.DLL
	IF YES GOTO ccutil_Append

:ccutil_Copy

	EXPAND 65 $(INPUTDIR)\MailDLLs\ccutil.DLL $(PATHDIR)\ccutil.DLL +R 0 "VIM Library" 2
	EXIST $(PATHDIR)\CCUTIL.DLL
	IF YES GOTO ccutil_NoCopy

:ccutil_Append
	
	RESTORE 3
	IF NO MESSAGE Unable to update the cc:Mail DLLs.  After you finish the installation, be sure to shutdown your postoffice and run $(USERDIR)\UPDVIM.BAT.
	EQUAL "" ""
	SAVE 3
	APPEND $(USERDIR)\UPDVIM.BAT "COPY $(INPUTDIR)\MailDLLs\CCUTIL.DLL $(PATHDIR)\CCUTIL.DLL"


:ccutil_NoCopy


;
; CCSMI
;
	RESTORE 3
	IF YES GOTO CCSMI_Append
	NEWERDLL $(INPUTDIR)\MailDLLs\CCSMI.DLL $(PATHDIR)\CCSMI.DLL
	IF NO GOTO CCSMI_NoCopy

	EXIST $(PATHDIR)\CCSMI.DLL
	IF NO GOTO CCSMI_Copy

	DELETE 67 $(PATHDIR)\CCSMI.OLD $(PATHDIR)\CCSMI.OLD -R 1 "VIM Library"
	RENAME 70 $(PATHDIR)\CCSMI.DLL $(PATHDIR)\CCSMI.OLD -R 0 "VIM Library"

	EXIST $(PATHDIR)\CCSMI.DLL
	IF YES GOTO CCSMI_Append

:CCSMI_Copy

	EXPAND 75 $(INPUTDIR)\MailDLLs\CCSMI.DLL $(PATHDIR)\CCSMI.DLL +R 0 "VIM Library" 2
	EXIST $(PATHDIR)\CCSMI.DLL
	IF YES GOTO CCSMI_NoCopy

:CCSMI_Append
	
	RESTORE 3
	IF NO MESSAGE Unable to update the cc:Mail DLLs.  After you finish the installation, be sure to shutdown your postoffice and run $(USERDIR)\UPDVIM.BAT.
	EQUAL "" ""
	SAVE 3
	APPEND $(USERDIR)\UPDVIM.BAT "COPY $(INPUTDIR)\MailDLLs\CCSMI.DLL $(PATHDIR)\CCSMI.DLL"

:CCSMI_NoCopy



;
; CDVIM
;
	RESTORE 3
	IF YES GOTO CDVIM_Append
	NEWERDLL $(INPUTDIR)\MailDLLs\CDVIM.DLL $(PATHDIR)\CDVIM.DLL
	IF NO GOTO CDVIM_NoCopy

	EXIST $(PATHDIR)\CDVIM.DLL
	IF NO GOTO CDVIM_Copy

	DELETE 77 $(PATHDIR)\CDVIM.OLD $(PATHDIR)\CDVIM.OLD -R 1 "VIM Library"
	RENAME 80 $(PATHDIR)\CDVIM.DLL $(PATHDIR)\CDVIM.OLD -R 0 "VIM Library"

	EXIST $(PATHDIR)\CDVIM.DLL
	IF YES GOTO CDVIM_Append

:CDVIM_Copy

	EXPAND 85 $(INPUTDIR)\MailDLLs\CDVIM.DLL $(PATHDIR)\CDVIM.DLL +R 0 "VIM Library" 2
	EXIST $(PATHDIR)\CDVIM.DLL
	IF YES GOTO CDVIM_NoCopy

:CDVIM_Append
	
	RESTORE 3
	IF NO MESSAGE Unable to update the cc:Mail DLLs.  After you finish the installation, be sure to shutdown your postoffice and run $(USERDIR)\UPDVIM.BAT.
	EQUAL "" ""
	SAVE 3
	APPEND $(USERDIR)\UPDVIM.BAT "COPY $(INPUTDIR)\MailDLLs\CDVIM.DLL $(PATHDIR)\CDVIM.DLL"

:CDVIM_NoCopy


;
; SMI
;
	RESTORE 3
	IF YES GOTO SMI_Append
	NEWERDLL $(INPUTDIR)\MailDLLs\SMI.DLL $(PATHDIR)\SMI.DLL
	IF NO GOTO SMI_NoCopy

	EXIST $(PATHDIR)\SMI.DLL
	IF NO GOTO SMI_Copy

	DELETE 87 $(PATHDIR)\SMI.OLD $(PATHDIR)\SMI.OLD -R 1 "VIM Library"
	RENAME 90 $(PATHDIR)\SMI.DLL $(PATHDIR)\SMI.OLD -R 0 "VIM Library"

	EXIST $(PATHDIR)\SMI.DLL
	IF YES GOTO SMI_Append

:SMI_Copy

	EXPAND 95 $(INPUTDIR)\MailDLLs\SMI.DLL $(PATHDIR)\SMI.DLL +R 0 "VIM Library" 2
	EXIST $(PATHDIR)\SMI.DLL
	IF YES GOTO SMI_NoCopy

:SMI_Append
	
	RESTORE 3
	IF NO MESSAGE Unable to update the cc:Mail DLLs.  After you finish the installation, be sure to shutdown your postoffice and run $(USERDIR)\UPDVIM.BAT.
	EQUAL "" ""
	SAVE 3
	APPEND $(USERDIR)\UPDVIM.BAT "COPY $(INPUTDIR)\MailDLLs\SMI.DLL $(PATHDIR)\SMI.DLL"

:SMI_NoCopy

#endif
:No_VIM_Updates
#if INSTALL.INF or WORKSTN.INF
	STATUSPERCENT 100
	CLOSESTATUS
#endif


#if WORKSTN.INF

; Temporary
;	GOTO Skip_VIM_Stuff

; Scheduling?
	RESTORE 1
	IF NO GOTO Skip_VIM_Stuff

;
; Switch to where the network dll's are
;
	CD $(SRCDIR)

	OPENSTATUS Checking Scheduling Information
	STATUSPERCENT 0

;
; load the libraries
;
	PRIMELOADS
	STATUSPERCENT 5

	LOADMEMMAN	$(SRCDIR)\MailDLLs\MEMMAN.DLL
	STATUSPERCENT 10
	LOADMAILENG	$(SRCDIR)\MailDLLs\MAILENG.DLL
	STATUSPERCENT 20
	LOADCHARSET	$(SRCDIR)\MailDLLs\CHARSET.DLL
	STATUSPERCENT 30
	LOADVIM		$(SRCDIR)\MailDLLs\VIM.DLL
	STATUSPERCENT 40
	LOADTHREADZ	$(SRCDIR)\TZDLL.DLL
	STATUSPERCENT 50
	LOADORGNET	$(SRCDIR)\ORGNET.DLL
	STATUSPERCENT 60
	LOADSCHDENG	$(SRCDIR)\SCHEDENG.DLL
	STATUSPERCENT 70
;
; gather login information.  if not, skip the rest
;
	SETUPVIMLOGIN GETVIMLOGINDLG GETVIMPASSWORDDLG 1 1
	IF NO GOTO VIM_NoNothing

;
; ask about copying calendar to network.  if not, setup for local
;
	STATUSPERCENT 80
	COPYUPVIMCAL ORGANIZE.INI

; in the case that the info is already there, don't mess with it
	IF IGNORE GOTO VIM_AllDone

; in the case that they don't want to copy up, set for local
	IF NO GOTO VIM_KeepLocal

; in the case that they had no local cal, skip ahead
	EQUAL $(CALSRC) ""
	IF YES GOTO VIM_SkipToStartup

;
; compare the source and destination
;
	STATUSPERCENT 85
	EQUALI $(CALSRC) $(CALDEST)
	IF YES GOTO VIM_SkipToStartup

;
; if no target file to be overwritten skip ahead
;
	EXIST $(CALDEST)
	IF NO GOTO VIM_NoTarget

;
; make a backup
;
	STATUSPERCENT 90
	RENAMEEXT $(CALDEST) OLD -R 0 "Old Network Calendar"

:VIM_NoTarget

;
; copy up to network
;
	STATUSPERCENT 95
	EXPAND 1 $(CALSRC) $(CALDEST) -R 0 "Local Calendar to Network" 0

:VIM_SkipToStartup

;
; set startup for network file
;
	STATUSPERCENT 97
	SETVIMSTARTUP ORGANIZE.INI 1

;
; all done
;
	GOTO VIM_AllDone

:VIM_KeepLocal

;
; set startup for local file
;
	STATUSPERCENT 99
	SETVIMSTARTUP ORGANIZE.INI 0

;
; all done
;
	GOTO VIM_AllDone

:VIM_NoNothing
	STATUSPERCENT 100
	CLOSESTATUS


;
; warn them about later logins
;
	MESSAGE The Organizer will prompt you to login to mail when needed.

:VIM_AllDone

;
; logout and close libraries
;
	CLOSEVIMLOGIN
	FREELOADS

	STATUSPERCENT 100
	CLOSESTATUS
#endif
:Skip_VIM_Stuff


#if WORKSTN.INF
; If Scheduling, then set path appropriately
	RESTORE 1
	IF NO GOTO Skip_PATH_Stuff

	EQUAL $(PATHDIR) ""
	IF NO GOTO Do_PATH_Stuff
	
	$(PATHDIR) = GETPROFILE $(WINDIR)\WIN.INI "cc:Mail" ProgramPath ""
	EQUAL $(PATHDIR) ""
	IF YES GOTO Skip_PATH_Stuff

:Do_PATH_Stuff
	ISPATHWRONG $(PATHDIR)
	IF NO GOTO Skip_PATH_Stuff

	QUESTION Lotus Organizer requires that your cc:Mail program path be in your path.  Install will modify your AUTOEXEC.BAT file to add the cc:Mail program path to your PATH statement, or you can make the change yourself.  Do you want Install to modify your AUTOEXEC.BAT file?

	IF NO GOTO Path_Not_Modified
	INSERTPATH $(PATHDIR)
; Has path been changed?
	IF YES MESSAGE The PATH in your AUTOEXEC.BAT file has been modified to include the cc:Mail Program Path.  You must reboot your workstation before running Lotus Organizer in order for Scheduling features to work properly.
	IF YES GOTO Skip_PATH_Stuff
	IF NO MESSAGE The Install program was unable to modify the AUTOEXEC.BAT file (probably because of insufficient disk space.)

:Path_Not_Modified
	MESSAGE After you complete the Lotus Organizer installation, remember to add your cc:Mail program path ($(PATHDIR)) to the PATH statement in your autoexec.bat file and reboot your workstation.

:Skip_PATH_Stuff
#endif


#if INSTALL.INF or SETUPDIR.INF
;;
;; Do Scheduling Specific stuff
;;

; Assume diradmin was not run
	EQUAL "" "NOT"
	SAVE 2

	RESTORE 1
	IF NO GOTO Skip_Diradmin_Stuff
;
; Do DIRADMIN stuff
;
	QUESTION The SETUPDIR utility adds scheduling information to the cc:Mail Directory.  You must run this utility to allow users to schedule meetings with the Organizer.  Do you want to set up the directory now?

#endif

:Diradmin_Start
#if SETUPDIR.INF
; Make sure we can find diradmin.exe.  $(USERDIR) won't be set.

	SETUSERDIR $(STARTDIR)\Admin
:Check_Diradmin
	EXIST $(USERDIR)\diradmin.exe
	IF YES GOTO Got_Admin_Dir
	$(USERDIR) = GETDIR Type the path to your Organizer administration tools.  This is the directory that you specified for the administration tools when you installed Organizer on the server.
	IF YES GOTO Check_Diradmin
	IF NO GOTO Setupdir_Not_Run

:Got_Admin_Dir
#endif
#if INSTALL.INF or SETUPDIR.INF

; Set whether we are running diradmin or not
	SAVE 2
	IF NO GOTO Skip_Diradmin_Stuff

;
; Switch to where the network dll's are
;
	CD $(DESTDIR)

;
; Load the schedule engine
;
	PRIMELOADS
	LOADMEMMAN	$(DESTDIR)\MailDLLs\MEMMAN.DLL
	LOADMAILENG	$(DESTDIR)\MailDLLs\MAILENG.DLL
	LOADCHARSET	$(DESTDIR)\MailDLLs\CHARSET.DLL
	LOADVIM		$(DESTDIR)\MailDLLs\VIM.DLL
	LOADTHREADZ	$(DESTDIR)\TZDLL.DLL
	LOADORGNET	$(DESTDIR)\ORGNET.DLL
	LOADSCHDENG	$(DESTDIR)\SCHEDENG.DLL

;
; Login to a PO
;
:Do_DIRADMIN_Login
	SETUPVIMLOGIN DIRADMIN_LOGIN DIRADMIN_PASSWORD 0 0
	SAVE 2
	IF YES GOTO Go_For_Launch
	FREELOADS
#endif
#if INSTALL.INF
	IF NO GOTO Skip_Diradmin_Stuff
#elseif SETUPDIR.INF
	IF NO GOTO Setupdir_Not_Run
#endif
#if INSTALL.INF or SETUPDIR.INF
:Go_For_Launch
;
; Confirm that the login is to a PO
;
	DIRADMINPOCHECK
	IF YES GOTO Got_DIRADMIN_Login

;
; If not a po, complain and try again
;
	MESSAGE You must login as the Post Office.  Please try again.
	CLOSEVIMLOGIN
	GOTO Do_DIRADMIN_Login

;
; Set the caption for DIRADMIN parameters
;
:Got_DIRADMIN_Login
	CAPTION Directory Setup

;
; Gather the DIRADMIN parameters
;
	DIRADMINGATHER

;
; Place the DIRADMIN parameters into a temporary file
;
	DIRADMINLAUNCH

; $(USERDIR) should hold the admin directory at this point...	
	CD $(USERDIR)
	RUN $(USERDIR)\diradmin.exe @$(INPUTDIR)

; Loop until DIRADMIN exits
:Check_DIRADMIN_Window
	WINDOWNAME SETUPDIR
	IF YES GOTO Check_DIRADMIN_Window
	WINDOWNAME (Inactive SETUPDIR)
	IF YES GOTO Check_DIRADMIN_Window

;
; Free the DIRADMIN parameters and delete the temporary file
;
	DIRADMINFREE

;
; Close the VIM login session
;
	CLOSEVIMLOGIN

;
; free schedule engine
;
	FREELOADS

:Skip_Diradmin_Stuff
#endif

#if SETUPDIR.INF
	GOTO End_Of_Setupdir
#endif


#if INSTALL.INF
;
; Skip ALL of this .INI stuff if we are doing a Server install
;

; Scheduling?
	RESTORE 0
	IF SERVER GOTO Finish_Install
#endif

#if INSTALL.INF or WORKSTN.INF
	STATUS Setting .INI File Defaults
#endif

#if WORKSTN.INF
;
; Secretary calendar -- only worry about it if they might be scheduling
;
	EXIST $(SRCDIR)\SchedEng.Dll
	IF NO GOTO Skip_Secretary
	QUESTION Will you be managing another user's calendar as well as your own?
	IF NO GOTO Skip_Secretary
	WRITEPROFILE $(WINDIR)\Organize.Ini "Settings" "Names" "1"

:Skip_Secretary

#endif
#if INSTALL.INF or WORKSTN.INF

;
; Check GrayText value for colors
;
	$(USERDIR) = GETPROFILE $(WINDIR)\Win.Ini colors GrayText ""
	EQUAL "128 128 128" $(USERDIR)
	IF YES GOTO No_Gray_Text
	WRITEPROFILE $(WINDIR)\Win.Ini colors GrayText "128 128 128"

:No_Gray_Text

;
; Set lotus.ini value
;
	WRITEPROFILE $(WINDIR)\Lotus.Ini "Lotus Applications" Organize $(DESTDIR)\Organize.Exe


; Do this only for scheduling install
;	RESTORE  1
;	IF NO GOTO Skip_Sched_Stuff
;	WRITEPROFILE $(WINDIR)\Organize.Ini "Settings" "OrgFiles" $(DESTDIR)\Users

:Skip_Sched_Stuff

; Do some mail things so Organizer works better with it
; Set DDE flag for WinMail 2.0
	RESTORE 1
	IF NO GOTO Skip_WinMail_Stuff

	ADJDDE $(WINDIR)\win.ini "cc:Mail" "LastUserId" "User0Dir" DDEApps 5

; Set LotusMail value because many users don't seem to have this set right
; Affects launching of WinMail from Organizer
	$(USERDIR) = GETPROFILE $(WINDIR)\Win.Ini "LotusMail" "application" ""
	EQUALI $(USERDIR) "wMail"
	IF YES GOTO Do_WinMail_Stuff

	EQUAL $(USERDIR) ""
	IF NO GOTO Skip_WinMail_Stuff

:Do_WinMail_Stuff
; application = NULL or application == wMail
	$(INPUTDIR) = GETPROFILE $(WINDIR)\Win.Ini "cc:Mail" "ProgramPath" ""
	WRITEPROFILE $(WINDIR)\Win.Ini "LotusMail" "program" "$(INPUTDIR)\wMail.exe SendMail"


:Skip_WinMail_Stuff

#endif

#if WORKSTN.INF
;
; Set save option defaults
;
	$(USERDIR) = GETPROFILE $(WINDIR)\Organize.Ini "Options" "SaveMode" "-1"
	EQUAL $(USERDIR) "-1" 
	IF NO GOTO Dont_Set_Save

; If scheduling, save after every change. Otherwise, save just when you want.
	RESTORE 1
	IF YES WRITEPROFILE $(WINDIR)\Organize.Ini "Options" "SaveMode" "0"
	IF NO WRITEPROFILE $(WINDIR)\Organize.Ini "Options" "SaveMode" "2"
#endif

:Dont_Set_Save

#if INSTALL.INF or WORKSTN.INF
;
; Set a .INI parameter to indicate where to find the master Organizer.INI file
;	
	WRITEPROFILE $(WINDIR)\Organize.Ini "Lan" ".INIHome" $(DESTDIR)
#endif

#if INSTALL.INF or WORKSTN.INF
;
; Put the associations into the win.ini
;
	WRITEPROFILE $(WINDIR)\Win.Ini Extensions ORG "$(DESTDIR)\Organize.exe ^.ORG"
	WRITEPROFILE $(WINDIR)\Win.Ini Extensions ORS "$(DESTDIR)\Organize.exe ^.ORS"

;
;       Windows 3.1 question to add to StartUp group
;

	EQUAL $(WINVER) 3.10
	IF NO GOTO Check_Win_Ini

	QUESTION Do you want Lotus Organizer to start automatically when you start Windows?
	IF NO GOTO No_Ini

	PROGMAN [CreateGroup( StartUp )]
	PROGMAN [ShowGroup( StartUp, 1 )]
; Old name
	PROGMAN [DeleteItem( Organizer )]
	PROGMAN [ReplaceItem( Lotus Organizer )]
	PROGMAN [AddItem( $(DESTDIR)\Organize.Exe, Lotus Organizer, $(DESTDIR)\OrgDll.Dll, 0 )]

	GOTO No_Ini

:Check_Win_Ini
;
; Determine if Lotus Organizer should be loaded from the load= line
;
	$(USERDIR) = GETPROFILE $(WINDIR)\Win.Ini Windows Load ""
	INSTR $(USERDIR) ORGANIZE
	IF YES GOTO Replace_Ini

	QUESTION Do you want Lotus Organizer to start automatically when you start Windows?
	IF NO GOTO No_Ini

	WRITEPROFILE $(WINDIR)\Win.Ini Windows Load "$(DESTDIR)\Organize.Exe $(USERDIR)"
	GOTO No_Ini

:Replace_Ini

	$(USERDIR) = REPLACESTRING Organize.Exe $(DESTDIR)\Organize.Exe $(USERDIR)
	WRITEPROFILE    $(WINDIR)\Win.Ini Windows Load "$(USERDIR)"

;
; Ask if we should add to the Program Manager
;
:No_Ini
	QUESTION Do you want Lotus Organizer added to the Lotus Applications Window so you can easily start the program when you run Windows?
	IF NO GOTO End_Of_Progman

	PROGMAN [CreateGroup( Lotus Applications )]
	PROGMAN [ShowGroup( Lotus Applications, 1 )]
; Old name
	PROGMAN [DeleteItem( Organizer )]
	EQUAL $(WINVER) 3.10
; This used to have quotes.  maybe that's why it's failing...
	IF YES PROGMAN [ReplaceItem( Lotus Organizer )]
	PROGMAN [AddItem( $(DESTDIR)\Organize.Exe, Lotus Organizer, $(DESTDIR)\OrgDll.Dll, 0 )]


:End_Of_Progman

;
; That's all folks
;

#elseif UNINSTAL.INF

;       Kill directories


	RMDIR $(DESTDIR)\SAMPLE
	RMDIR $(DESTDIR)\ORGFILES
	RMDIR $(DESTDIR)\MAILDLLS
	RMDIR $(DESTDIR)\USERS
	RMDIR $(DESTDIR)\PRINTING
	RMDIR $(DESTDIR)\ADMIN
	RMDIR $(DESTDIR)


;       Kill progman items if Win 3.1


	EQUAL   $(WINVER) 3.10
	IF YES PROGMAN [ShowGroup( Lotus Applications, 1 )]
	IF YES PROGMAN [DeleteItem( Organizer )]
	IF YES PROGMAN [DeleteItem( Lotus Organizer )]
	IF YES PROGMAN [DeleteItem( Organizer Utilities )]
	IF YES PROGMAN [DeleteItem( Organizer Administrator )]
	IF YES PROGMAN [DeleteItem( OrgUtils )]
	IF YES PROGMAN [DeleteItem( Sample )]
	IF YES PROGMAN [DeleteItem( Traveler )]


;       Check StartUp Group


	IF YES PROGMAN [ShowGroup( StartUp, 1 )]
	IF YES PROGMAN [DeleteItem( Organizer )]


;       Clean LOTUS.INI

	WRITEPROFILE $(WINDIR)\Lotus.Ini "Lotus Applications" Organize [NULL]


;       Clean WIN.INI Extensions
;
	WRITEPROFILE $(WINDIR)\Win.Ini Extensions ORG [NULL]
	WRITEPROFILE $(WINDIR)\Win.Ini Extensions ORS [NULL]


;       Clean WIN.INI Load= line

	$(USERDIR) = GETPROFILE $(WINDIR)\Win.Ini Windows Load ""
	INSTR $(USERDIR) ORGANIZE
	IF NO GOTO No_Ini_Clean

	$(USERDIR) = REPLACESTRING Organize.Exe [NULL] $(USERDIR)
	WRITEPROFILE    $(WINDIR)\Win.Ini Windows Load "$(USERDIR)"
	
:No_Ini_Clean

#endif ;Uninstall


:Finish_Install

	STATUSPERCENT 100
	CLOSESTATUS

#if INSTALL.INF
:End_Of_Install

	RESTORE 0
	IF SERVER GOTO End_Of_Install2
#endif
#if INSTALL.INF or WORKSTN.INF
; Standalone
	MESSAGE	Installation of Lotus Organizer 1.1 was successful.\r\rThank you for purchasing Lotus Organizer.
	GOTO Big_End
#endif

#if INSTALL.INF
;
; If DIRADMIN was run, then different message
;
:End_Of_Install2

	RESTORE 1
	IF YES GOTO End_Of_Install_w_Sched
; Server, no Scheduling
	MESSAGE Installation of Lotus Organizer 1.1 was successful.  Run WORKSTN.EXE to install the Organizer on individual workstations.
	GOTO Big_End

:End_Of_Install_w_Sched

	RESTORE 2
; Scheduling, no Diradmin
	IF NO MESSAGE Installation of Lotus Organizer 1.1 on the server was successful. Run SETUPDIR or DIRADMIN to add scheduling information to the cc:Mail Directory. See the Administrator's Guide for instructions.\r\rSee the README.TXT file for recent information about Lotus Organizer 1.1.

	IF YES MESSAGE Installation of Lotus Organizer 1.1 on the server was successful.  Run WORKSTN.EXE to install Lotus Organizer on individual workstations.\r\rSee the README.TXT file for recent information about Lotus Organizer 1.1.

#elseif UNINSTAL.INF

	MESSAGE Lotus Organizer has been removed from your system. If you removed it from a network drive, or SHARE is loaded, the $(SRCDIR) directory and the UNINSTAL.EXE program still exist. These can be deleted using the Windows File Manager.

#elseif SETUPDIR.INF
:End_Of_Setupdir
	MESSAGE Installation of Lotus Organizer 1.1 scheduling information into the directory was successful.\r\rSee the README.TXT file for recent information about Lotus Organizer 1.1.

	GOTO Big_End

:Setupdir_Not_Run
	MESSAGE The directory has not been updated.  Please run SETUPDIR again if you would like to update your cc:Mail directory.

#endif

:Big_End
CLOSESTATUS
;
