;**************************************************************************
;* Norton AntiVirus for NetWare Install Script                            *
;**************************************************************************

[InstallVersion]
3.4

[WindowsVersion]
3.10
"The Norton AntiVirus for NetWare Install"
"Program and the Configuration Program"
"requires Microsoft Windows version 3.1"
"or greater."

[Process]
;Bitmaps.pix

AllowIntlChars()
SetActiveCopy(NFNCopy, install.inf)

EnableTestPaths()

; Initiate a virus scan of the user's system.  We don't want to install
; to an infected system.
Backup(CopyVirusScanStuff)
CallProc(DoVirusScan)
Delete(DelVirusScanStuff)

; Is the user registered with a previous version?  If we do not find
; registration information, then prompt him for it.
switch15 = IsRegistered()
#ifnot (switch15)
   Registration()
#endif

; Does the user want a full installation or a custom install?  If he selects
; Custom then switch92 will become TRUE.
SelectInstallType()
#if (switch92)
    ; Custom Install was selected
    PrimarySelect()
#endif

; Are we installing the NLM?  Are we installing the configuration program?
; Query the target directories based on what components are being installed.
switch40 = IsOptionSelected(NLM)
switch41 = IsOptionSelected(NLMConfig)

; If they didn't select anything, just exit
switch60 = IsInstallShell()

#ifnot (switch40)
   #ifnot (switch41)
       #if (switch60)
           End(ByeNoSel)
       #else
           MessageBox(ExitMessage)
           Exit()
       #endif
   #endif
#endif

; Install those components that the user has selected.

ResetTarget(InitTarget)

:NLMSel
switch95 = FALSE
switch96 = FALSE

#if (switch40)
    ; He wants the NLM so figure out where to put it, creating the required
    ; directory if necessary.
    switch55 = PathBrowse(BrowseNLM)
    #ifnot (switch55)
        MessageBox(ByeCancelInstall)
        Exit()
    #endif
    switch65 = CheckDiskSpace(TARGET)
    #ifnot (switch65)
        DiskSpaceError(NoSpace)
        #if(switch95)
            goto(NLMSel)
        #endif
    #endif
    #ifnot (switch41)    
        ResetTarget(SetT2toT1)
    #endif
    CreateDirectory(CreateDirNLM)
#endif

:ConfigSel
switch95 = FALSE
switch96 = FALSE

#if (switch41)
    ; He wants to install the Windows configuration program.
    switch55 = PathBrowse(BrowseConfig)
    #ifnot (switch55)
        MessageBox(ByeCancelInstall)
        Exit()
    #endif
    switch65 = CheckDiskSpace(TARGET2)
    #ifnot (switch65)
        DiskSpaceError(NoSpace)
        #if(switch95)
            goto(ConfigSel)
        #endif
    #endif
    #ifnot (switch40)    
        ResetTarget(SetT1toT2)
    #endif
    CreateDirectory(CreateDirNLMConfig)
#endif

; Copy items to where they need to go.
Copy()

; Do only those things we would do if we are installing the NLM on to the
; file server.
#if (switch40)
    ; Modify the Autoexec.Ncf or MsAuto.Ncf file on the server.  We will
    ; try for the MsAuto.Ncf file first since SFT-III should be the first
    ; thing looked for.  SIWMsAutoNcfInit takes the drive letter where the
    ; NLM was installed to and returns a path of "<x>:\system\msauto.ncf"
    ; where <x> is the drive letter.
    switch50 = CallProcEx(SIWMsAutoNcfInit)
    #if (switch50)
        ; Found MSEXEC.NCF file so modify it.
        ModifyTextFile(ModifyMsAutoNcf)
    #else
        ; Couldn't find a "<x>:\system\msauto.ncf" file.  Now try for a
        ; "<x>:\system\auteoxec.ncf" file.
        switch51 = CallProcEx(SIWAutoexecNcfInit)
        #if (switch51)
            ; Found AUTOEXEC.NCF file so modify it.
            ModifyTextFile(ModifyAutoexecNcf)
        #else
            ; We found neither an MSAUTO.NCF file nor an AUTOEXEC.NCF file so
            ; tell the user what to do.
            MessageBox(MessageNoNcfFile)
        #endif
    #endif
    ; Create NAVServer DS object if installing to a DS Server
    CallProcEx(SIWCreateNAVServerObject)
#endif

; Do only those things we would do if we are installing the configuration
; component.
#if (switch41)
    ; Set up Groups in Windows Shell Program
    Groups()

    ; Update the NDW.INI file for the activity log viewers
    UpdateIni(UpdateNDWIni)

    ; Update the NWADMIN.INI file (if exists) to install our Snap-in DLL
    switch10 = Exists(NWAdminINI)
    #if (switch10)
        switch11 = VerifyIni(InstallSnapin)
        switch12 = TRUE
        #ifnot (switch11)
            switch12 = MessageYesNo(NWAdminInstall)
            #if (switch12)
                AddToIni(InstallSnapin)
            #endif
        #endif

        ; Make sure we can find ourselves
        #if (switch12)
            UpdateIni(LaunchUI)
        #endif
    #endif
#endif

; Delete any remaining garbage.
Delete(DelLeftovers)

; Exit the install program based on if we are the shell or not.
switch20 = IsInstallShell()
#if (switch20)
  End(ByeNoReboot)
#else
  MessageBox(ByeNoReboot)
  Exit()
#endif



;**************************************************************************
;* Set Shell section                                                      *
;**************************************************************************

[SetShell]
AppIniName      = nav.ini
WinIniName      = win.ini
SystemIniName   = system.ini
Message         = MessageBox.SetShellMessage
SysSectionName  = boot
WinSectionName  = windows
shell           = %s\install.exe
load            =
run             =
SetShellIfLoaded=
Backup          = Backup.SetShellSave
Restore         = Backup.SetShellRestore
Active          = Yes
IfActiveList    = LoadedList
SubProcess      =

[SetShellSave]
win.ini,    win.$nn,    WINDOWS
system.ini, system.$nn, WINDOWS

[SetShellRestore]
system.$nn, system.ini, WINDOWS
win.$nn,    win.ini,    WINDOWS

[LoadedList]
nwcalls.dll
nwnet.dll
nwipxspx.dll
nwlocale.dll
symgui6.dll
navnlmw.exe

[SetShellMessage]
caption = "Norton AntiVirus for NetWare -- Install"
"Welcome to the Norton AntiVirus for NetWare"
"install program.  Please press OK to allow"
"Install to restart Windows and continue the"
"installation.  Press Cancel to exit."


;**************************************************************************
;* Copy                                                                   *
;**************************************************************************

[NFNCopy]
;seltype.component, description,                        size,req,files,show
CopyMain.BaseFiles, "Norton AntiVirus for NetWare",      0,   Y,  N,    N
CopyMain.NLM,       "Norton AntiVirus for NetWare NLM",  0,   N,  N,    Y
CopyMain.NLMConfig, "Windows Configuration Program",     0,   N,  N,    Y

[NFNCopy:TypeSelect]
count       = 2
caption     = "Norton AntiVirus for NetWare - Installation Type"
text        = "Please select the installation you prefer."
grouptext   = "Install Types"
button1     = "&Automatic Installation"
button2     = "&Custom Installation"
descrip1    = "Installs the entire Norton AntiVirus for NetWare package, including the Windows configuration program."
descrip2    = "Lets you choose which modules to install now.  If you need to add more options later, you can run install again."

[NFNCopy:Primary]
caption = "Norton AntiVirus for NetWare - Application Selection"
button1 = ""
button2 = "&Files..."
button3 = "F&iles..."
button4 = "Fi&les..."
text = primarytext

[PrimaryText]
"Please select the items you wish to install."

[NFNCopy:Component]
caption = "Norton AntiVirus for NetWare - Component Selection"
text = "Please choose the components you wish to install.  Highlighted items are selected."

[NFNCopy:CopyDialog]
caption = "Copying Files..."
posx = -10
posy = -10

[NFNCopy:Advo]
x-position = 5
y-position = 5
location   = siwadvo.dll
count      = 3

[AdvoDefault]
posx = 20
posy = 80
text = AdvoText

[AdvoText]
"Be sure to fill out your registration"
"card.  This will allow Symantec to contact"
"you about future product updates."


;**************************************************************************
;* Not enough disk space                                                  *
;**************************************************************************

[NoSpace]
caption = "Insufficient Disk Space"
radio1 = "Change &Drive"
radio2 = "&Continue Installation"
descrip1 = "Choose this option to change the installation drive to another drive with more space available."
descrip2 = "This option may result in an incomplete installation.  We recommend that you choose the other option or exit the install and delete files."
AllowContinue = 0


;**************************************************************************
;* Groups                                                                 *
;**************************************************************************

[Groups]
"Norton AntiVirus",             navnlm.grp

[Norton AntiVirus]
"Norton AntiVirus for NetWare",     navnlmw.exe,     NLMConfig, ,TARGET2


;**************************************************************************
;* Dialogs/Message box text                                               *
;**************************************************************************

[ByeNoReboot]
caption = "Norton AntiVirus for NetWare -- Install Complete"
""
""
"This concludes the installation of Norton AntiVirus for NetWare."
"Please review the READ.ME file for last minute updates to the documentation."

[ByeCancelInstall]
caption = "Norton AntiVirus for NetWare"
"You have cancelled the installation"
"of Norton AntiVirus for NetWare."

[ByeNoSel]
caption = "Norton AntiVirus for NetWare"
""
""
"Because no items were selected for"
"installation, this may be an incomplete"
"install of Norton AntiVirus for NetWare."

[ExitMessage]
caption = "Norton AntiVirus for NetWare"
"Because no items were selected for"
"installation, this may be an incomplete"
"install of Norton AntiVirus for NetWare."
""
"Press OK to return to your Windows session."

[Errors]
noprev  =  "Symantec Install for Windows is already running!"

[FileCopy]
copycaption   =  "Norton AntiVirus for NetWare -- Install"
errorcaption  =  "Error Copying Files"
insertcaption =  "Insert Diskette"
Message    = MessageText

[Cancel]
caption = "Norton AntiVirus for NetWare -- Install"
text   = "Are you sure you want to exit?"

[CancelShell]
caption = "Norton AntiVirus for NetWare -- Install"
text = "When you cancel Install, Windows will exit so that we can reset the Windows environment."
       "Are you sure you want to exit?"


;**************************************************************************
;* Misc install information                                               *
;**************************************************************************

;[pix]
;color = %s\nav.bmp

[DelLeftovers]
siwcust.dll,  WINDOWS
siwadvo.dll,  WINDOWS


;**************************************************************************
;* Virus Scan Instructions                                                *
;**************************************************************************

[CopyVirusScanStuff]
scaninst.dll, scaninst.dll, SOURCE, WINDOWS
virscan.dat,  virscan.dat,  SOURCE, WINDOWS
inscanf.dat,  inscanf.dat,  SOURCE, WINDOWS
inscanb.dat,  inscanb.dat,  SOURCE, WINDOWS
inscanm.dat,  inscanm.dat,  SOURCE, WINDOWS
siwvscan.dll, siwvscan.dll, SOURCE, WINDOWS
symkrnl6.dll, symkrnl6.dll, SOURCE, WINDOWS
symutil6.dll, symutil6.dll, SOURCE, WINDOWS
symgui6.dll,  symgui6.dll,  SOURCE, WINDOWS
siwadvo.dll,  siwadvo.dll,  SOURCE, WINDOWS

[DoVirusScan]
dll      = siwvscan.dll
function = ScanForViruses

[VirusScan]
dllname       = scaninst.dll
caption       = "Scanning for Viruses"
scanboot      = yes
scanmem       = yes
scanfloppy    = no
scanfixed     = yes
abortiffound  = no
recommendtext = VirusFoundText

[VirusFoundText]
"A virus was found on your system."
"We recommend that you boot off of"
"a CLEAN, WRITE PROTECTED diskette"
"and use Norton AntiVirus to"
"remove the virus before proceeding"
"with the installation."
"Do you want to abort the installation ?"

[DelVirusScanStuff]
scaninst.dll, WINDOWS
virscan.dat,  WINDOWS
inscanf.dat,  WINDOWS
inscanb.dat,  WINDOWS
inscanm.dat,  WINDOWS
siwvscan.dll, WINDOWS
symkrnl6.dll, WINDOWS
symutil6.dll, WINDOWS
symgui6.dll,  WINDOWS


;**************************************************************************
;* User Registration                                                      *
;**************************************************************************

[Registration]
caption =  "Norton AntiVirus for NetWare -- Registration"
text1   =  RegText
text2   =  "&Name:"
text3   =  "&Company:"
Cancel  =  "Cancel"
Help    =  "&Help"
appname =  navnlmw.exe
string  =  "Symantec Install for Windows"
active  =  no

[RegText]
""
""
"Please register your name and company before continuing:"

;**************************************************************************
;* AutoExecNcf modifications                                              *
;**************************************************************************

[ModifyAutoExecNcf]
caption    = "Norton AntiVirus for NetWare -- Modify AUTOEXEC.NCF File"
text1      = "The following changes need to be made to your AUTOEXEC.NCF file:"
FileType   = text
Rem1       = "REM "
FindRems   = 0
EditCaption= "Edit  AUTOEXEC.NCF"
EditError1 = "A problem was encountered preparing the new autoexec.ncf"
EditError2 = " "
EditError3 = "You should:"
EditError4 = "1. Review the lines that need to be added"
EditError5 = "2. Select the 'Save the required changes to new file's option"
EditError6 = "3. Continue and complete the Install Process"
EditError7 = "4. Make the changes to the autoexec.ncf file later"
RemItems   = AutoExecNcfRemItems
DelItems   = AutoExecNcfDelItems
AddItems   = AutoExecNcfAddItems

[AutoExecNcfRemItems]
*nav.nlm*

[AutoExecNcfDelItems]

[AutoExecNcfAddItems]
"load %s\nav.nlm",                             TARGET4, APPEND

[MessageNoNcfFile]
caption = "Updating AUTOEXEC.NCF / MSAUTO.NCF"
"The install program could not access the AUTOEXEC.NCF or MSAUTO.NCF file on the target volume."
"In order for Norton AntiVirus for NetWare to protect your server, you must manually load
"NAV.NLM from the server console or modify the appropriate startup file to load NAV.NLM automatically."


;**************************************************************************
;* MsAutoNcf modifications                                                *
;**************************************************************************

[ModifyMsAutoNcf]
caption    = "Norton AntiVirus for NetWare -- Modify MSAUTO.NCF File"
text1      = "The following changes need to be made to your MSAUTO.NCF file:"
FileType   = text
Rem1       = "REM "
FindRems   = 0
EditCaption= "Edit  MSAUTO.NCF"
EditError1 = "A problem was encountered preparing the new msauto.ncf"
EditError2 = " "
EditError3 = "You should:"
EditError4 = "1. Review the lines that need to be added"
EditError5 = "2. Select the 'Save the required changes to new file's option"
EditError6 = "3. Continue and complete the Install Process"
EditError7 = "4. Make the changes to the msauto.ncf file later"
RemItems   = MsAutoNcfRemItems
DelItems   = MsAutoNcfDelItems
AddItems   = MsAutoNcfAddItems

[MsAutoNcfRemItems]
*nav.nlm*

[MsAutoNcfDelItems]

[MsAutoNcfAddItems]
"load %s\nav.nlm",                             TARGET4, APPEND


;**************************************************************************
;* Modify NDW.INI section                                                 *
;**************************************************************************

[UpdateNDWIni]
IniName         = ndw.ini
SectionName     = Viewer-Filemap
TXT             = SYMDOC.PRS
SectionName     = Viewer-Parsers
SYMDOC.PRS      = "Symantec Document Parser"


;**************************************************************************
;* Install our Snap-in DLL in NWADMIN.INI                                 *
;**************************************************************************

[NWAdminINI]
nwadmin.ini, WINDOWS

[NWAdminInstall]
caption = "Norton AntiVirus for NetWare - NWADMIN Installation"
"Norton AntiVirus for NetWare provides a Snap-in DLL for NetWare 4.1 NWADMIN utility, which"
"allows NWADMIN to be used to manage NAV NLM Directory Services objects."
"This capability is only provided with NWADMIN version 4.10.2 or greater."
""
"Are you using NWADMIN version 4.10.2 or greater ?"

[InstallSnapin]
IniName         = nwadmin.ini
SectionName     = "Snapin Object DLLs"
SNAPIN          = NAVSNAP.DLL

[LaunchUI]
IniName         = nwadmin.ini
SectionName     = "Norton AntiVirus for NetWare"
Path            = %s\NAVNLMW.EXE, TARGET2


;**************************************************************************
;* Target Selection Stuff                                                 *
;**************************************************************************

[InitTarget]
reset           = TARGET
location        = FirstNetDrive
defaultdir      = system\navnlm

[BrowseNLM]
;NOTE:  DefaultDir intentionally left blank.
caption         = "Select Network Directory for NLM"
reset           = TARGET

[BrowseConfig]
caption         = "Select Directory for Configuration Program"
DefaultDir      = C:\NAVNLM
reset           = TARGET2

[SetT1toT2]
Reset = TARGET
Location = %s,  TARGET2

[SetT2toT1]
Reset = TARGET2
Location = %s,  TARGET

[CreateDirNLM]
%s,TARGET

[CreateDirNLMConfig]
%s,TARGET2

[SIWAutoexecNcfInit]
dll = siwcust.dll
function = SIWAutoexecNcfInit

[SIWMsAutoNcfInit]
dll = siwcust.dll
function = SIWMsAutoNcfInit

[SIWCreateNAVServerObject]
dll = siwcust.dll
function = SIWCreateNAVServerObject
