;***************************************************************************
;* Norton AntiVirus for Windows 95 (Luigi) Install Script                  *
;* FOR VERSION 4.0+ OF SYMANTEC INSTALL FOR WINDOWS                        *
;***************************************************************************
;
;    Target Usage
;----------------------------
; TARGET        LFN directory for NAV (Def: \Program Files\Norton AntiVirus)
; TARGET2       LFN NAV system directory (Def: {TARGET}\System)
; TARGET3       LFN Shared Componented directory (Def: \SOFTWARE\Symantec\SharedUsage)
; TARGET3       (later in script) TARGET3 = SFN of TARGET
; TARGET4       SFN version of TARGET2
; TARGET5       SFN version of original TARGET3
;
;    Switch Assignments
;----------------------------
; // These settings control the setup wizard flow
; SWITCH_PREVIOUS         50      // TRUE = script should backup a screen
; SWITCH_NEXT             51      // TRUE = script should move to next screen
;                                 // NOTE: If both NEXT/PREV are FALSE, stay on same screen.
; SWITCH_CANCEL           52      // TRUE= script should exit
;
; SWITCH_FILEVIRUS        55      // TRUE = Files infected 
;                                 // (memory and boot don't come back!)
;
; SWITCH_CUSTOM           63      // TRUE = custom install
;                                 // FALSE= full install
;
; // Choices made from "Specify Location to Install" dialog
; SWITCH_LOC_DEFAULT      67      // TRUE = Use default directory
;                                 // FALSE= Use "other" directory
; SWITCH_PREVIOUSVER      68      // TRUE = Found previous version
; SWITCH_FLOPPY_IN_DRIVE  69      // TRUE = There's a floppy in the drive
;
; // Choices made from the "Out of disk space" dialog
; SWITCH_NOSPACE_WINDRIVE 70      // TRUE = No space on the Windows drive
; SWITCH_NOSPACE_DESELECT 71      // TRUE = Go to custom install
; SWITCH_NOSPACE_NEWDRIVE 72      // TRUE = Select another target drive
;                                 // User can also exit install.
;                                 // or proceed at their own risk
;                                 // (maybe they cleaned up some room)
;
; SWITCH_REBOOT           73      // TRUE = user wants to reboot now
;                                 // FALSE= user wants to reboot later
;  
; // These settings control which set of options should be installed
; SWITCH_OPTS_LOW         75      // TRUE= Install minimal protection
; SWITCH_OPTS_NORMAL      76      // TRUE= Install normal protection
; SWITCH_OPTS_MAX         77      // TRUE= Install maximum protection
; 
; // These settings control what's installed automatically
; SWITCH_DO_RUNAUTOPROTECT 80     // TRUE= Load autoprotect at startup
; SWITCH_DO_RUNSCHEDULE   81      // TRUE= Load scheduler at startup
; SWITCH_DO_RUNNAVBOOT    82      // TRUE= Load NAVBOOT at startup
; SWITCH_DO_MAKERESCUE    83      // TRUE= Make a rescue disk
;
; ??SWITCH_ADDPATH          79  -- Add install path to autoexec.bat
;
; ??SWITCH_FLOPPY           80  -- Is a diskette in the drive.
;

[InstallVersion]
4.0

[Process]
Bitmaps(Pix)                           ; Background bitmaps
DisableHelp()                          ; Don't display help buttons
Backup(CustDLLCopy)                    ; Copy custom DLL to Windows dir

;////////////////////////////////////////
;// I N I T I A L I Z E   M E M O R Y
;////////////////////////////////////////
CallProc(InitMemory)

;////////////////////////////////
;//  V E R S I O N   C H E C K
;////////////////////////////////

switch99 = IsWinVerGTE(0395)            ; Check if running under Win 95

#ifnot(switch99)
    switch99 = IsWinVerGTE(035)         ; Check if running under Win NT

    #ifnot(switch99)
	CallProc(WrongVersion)
	Exit()
    #endif
#endif

SetActiveCopy(NAVCopy, install.inf)

;/////////////////////////////////////////////////////////////////////
;//  C H E C K   F O R   S P A C E   O N   W I N D O W S   D R I V E
;/////////////////////////////////////////////////////////////////////
CallProc(CheckWinSpace)
#if(switch70)
    CallProc(NoWinSpace)
    goto (CleanupAndExit)
#endif

;/////////////////////////////////////////////////
;//  S E T   T A R G E T  D I R E C T O R I E S 
;/////////////////////////////////////////////////
:TargetDirs
switch68 = FALSE                        ; MOREWORK: Not set in DLL yet

switch02 = CallProcEx(CheckLFNTarget)   ; Target drive support LFN's?
switch03 = CallProcEx(CheckLFNCDrive)   ; Boot drive support LFN's?
switch04 = CallProcEx(CheckLFNWindows)  ; Windows drive support LFN's?

#ifnot(switch02)
   ResetTarget(TargetExt)      ; Set 8.3 application extensions folder
#else
   #ifnot(switch68)            ; If LFN support but no prev version
      ResetTarget(TargetLFN)   ; Set default LFN target
   #endif
      ResetTarget(TargetExtLFN) ; Set LFN application extensions folder
#endif

;////////////////////////////////
;//  W E L C O M E  D I A L O G
;////////////////////////////////
:WelcomeDialog  
CallProc(Welcome)
#if(switch52)
    goto (CleanupAndExit)               ; Exit if user chooses to bail
#endif

;////////////////////////////////
;//  S C A N N I N G  D I A L O G
;////////////////////////////////
:DuringScanDialog  
CallProc(DuringScan)
#if(switch52)
    goto (CleanupAndExit)               ; Exit if user chooses to bail
#endif

;////////////////////////////////
;//  A F T E R  S C A N  D I A L O G
;////////////////////////////////
:AfterScanDialog  
CallProc(AfterScan)
#if(switch52)
    goto (CleanupAndExit)               ; Exit if user chooses to bail
#endif
#if(switch50)
    goto(WelcomeDialog)
#endif

;//////////////////////////////////////////
;// R E G I S T R A T I O N   D I A L O G
;//////////////////////////////////////////
:RegisterDialog
CallProc(Register)
#if(switch52)
    goto (CleanupAndExit)               ; Exit if user chooses to bail
#endif
#if(switch50)
	goto(AfterScanDialog)
#endif

;///////////////////////////////////////////////////////
;// C O M P L E T E  O R   C U S T O M   I N S T A L L
;///////////////////////////////////////////////////////
:InstallTypeDialog
CallProc(InstallType)
#if(switch52)
    goto (CleanupAndExit)               ; Exit if user chooses to bail
#endif
#if(switch50)
    goto(RegisterDialog)
#endif


;////////////////////////////////////////////////////////////////////
;// F I N D   S H A R E D   C O M P O N E N T S   D I R E C T O R Y
;////////////////////////////////////////////////////////////////////
switch99 = CallProcEx(FindSharedComponents) ; Get shared comp dir from reg
#ifnot(switch99)
   #ifnot(switch03)            ; If shared comp folder not registered and
      GetSymantecDir()         ;   no LFN support, use Symantec dir.
      ResetTarget(TargetShared)
   #endif
#endif

GetPrevVerSize()               ; Calculate the prev ver size if available
switch98 = TRUE                ; Need to prompt for drive/folder

#ifnot(switch63)
;   goto(InstallLocation)       ; If not custom install, jump to drive select
   goto(VersionSearch)       ; If not custom install, jump to drive select
#endif

:compselect
PrimarySelect()                ; Prompt for components to install

#ifnot(switch98)
   goto(CheckSpace)            ; Skip drive prompt if reselect comp after err
#endif

;//////////////////////////////////////////////////////////
;// S E A R C H   F O R  P R E V I O U S  V E R S I O N S
;//////////////////////////////////////////////////////////
:VersionSearch
CallProc(SearchInfo)
#if(switch52)
    goto (CleanupAndExit)               ; Exit if user chooses to bail
#endif
#if(switch50)
    goto(InstallTypeDialog)
#endif

;/////////////////////////////////////////////////////////////////////
;// D E F A U L T   O R   O T H E R  I N S T A L L  L O C A T I O N
;/////////////////////////////////////////////////////////////////////
:InstallLocation
CallProc(SpecifyLocation)
#if(switch52)
    goto (CleanupAndExit)               ; Exit if user chooses to bail
#endif
#if(switch50)
   goto(InstallTypeDialog)
#endif

;//////////////////////////////////////////////////
;// C O M P R E S S E D   D R I V E   D I A L O G
;//////////////////////////////////////////////////
:CompressedDialog

switch40 = FALSE
switch99 = IsWinVerGTE(035)         ; Check if running under Win NT

#ifnot(switch99)
                                    ; Don't check compressed if running NT
    switch40 = IsDriveCompressed(ALL)
#endif

#if(switch40)
    CallProc(CompressedDrive)
    #if(switch52)
	goto (CleanupAndExit)           ; Exit if user chooses to bail
    #endif
    #if(switch50)
	goto(InstallLocation)
    #endif
#endif

;////////////////////////////////////////////
;// C H E C K   F O R   D R I V E S P A C E
;////////////////////////////////////////////
:checkspace
switch71 = FALSE
switch72 = FALSE

switch98 = CheckDiskSpace(TARGET)       ; Selected components fit on target?
#ifnot(switch98)
    CallProcEx(NoDiskSpace)             ; Display error if not
#endif

#if(switch52)
    goto (CleanupAndExit)               ; Exit if user chooses to bail
#endif
#if(switch71)
    goto(compselect)                    ; Reselect Components
#endif
#if(switch72)
    goto(InstallLocation)               ; Select another drive to install to
#endif

;//////////////////////////////////
;// S T A R T U P   O P T I O N S     
;//////////////////////////////////
:StartupDialog
switch80 = IsOptionSelected(navapw)
switch81 = IsOptionSelected(scheduler)
switch82 = IsOptionSelected(navboot)
#ifnot(switch80)
    #ifnot(switch81)
	#ifnot(switch82)
	    #if(switch50)
		goto(InstallLocation)   ; Keep backing up if we don't display
	    #else
		goto(RescueDialog)      ; Keep going next if we don't display
	    #endif
	#endif
    #endif
#endif

CallProcEx(StartupDlg) 
#if(switch52)
    goto (CleanupAndExit)               ; Exit if user chooses to bail
#endif
#if(switch50)
	goto(InstallLocation)
#endif

;////////////////////////////////
;//  R E S C U E  D I A L O G
;////////////////////////////////
:RescueDialog
; switch99 = IsOptionSelected(rescuew)
switch99 = FALSE                        ; MOREWORK: No rescue yet

#if(switch99)                           ; Create a rescue disk
    switch83 = TRUE                     ; Suggest a rescue by default...
    CallProcEx(RescueDlg)
    ; MOREWORK: switch83=TRUE if we should make a rescue now.
    #if(switch52)
	goto (CleanupAndExit)           ; Exit if user chooses to bail
    #endif
#else
    switch83 = FALSE                    ; Can't make a disk if not copying
#endif
					; NOTE: Works even if we are
					;       backing up and not displaying
#if(switch50)
    goto(StartupDialog)
#endif

;////////////////////////////////////////
;// C O P Y   F I L E S   D I A L O G
;////////////////////////////////////////
:CopyFilesDialog
CallProc(CopyFiles)
#if(switch52)
    goto (CleanupAndExit)               ; Exit if user chooses to bail
#endif
#if(switch50)
    goto(RescueDialog)
#endif

;////////////////////////////////////////
;// C R E A T E   D I R E C T O R I E S 
;////////////////////////////////////////
CreateDirectory(CreateExtDir)
CreateDirectory(CreateSharedDir)  

;////////////////////////////////////////
;//        C O P Y   F I L E S
;////////////////////////////////////////
DisableUtils()
Copy()
EnableUtils()

switch99 = Exists(SymevntFind)
#if(switch99)
   Backup(SymevntCopy)         ; Update Symevnt files if in system dir
#endif

;//////////////////////////////////////////////////////////
;// S T O R E   U S E R  R E G I S T R A T I O N  I N F O
;//////////////////////////////////////////////////////////
RegisterNAV30()
SetRegistration(SetNAVRegister)

;/////////////////////////////////////////
;// U P D A T E   U S A G E  C O U N T S 
;/////////////////////////////////////////
CallProcEx(UsageCounts)

;////////////////////////////////////////////////////////////////
;// C R E A T E   S H O R T   N A M E S   F O R   T A R G E T S
;////////////////////////////////////////////////////////////////
ResetTarget(TargetSharedShort)
CallProcEx(GetShort)
ResetTarget(TargetSharedSave)           ; Save SFN of shared path in TARGET5
ResetTarget(TargetShort)
CallProcEx(GetShort)                    ; Set SFN of target path in TARGET4

MergeRegFile(NavReg)                    ; NAV95.REG needs LFN of shared in TARGET3
					; And SFN of target path in TARGET4

ResetTarget(TargetSave)                 ; Save SFN of target path in TARGET3
ResetTarget(TargetExtShort)
CallProcEx(GetShort)                    ; Set SFN of app ext path in TARGET4   

;///////////////////////////////////////////////////////////////
;// U P D A T E  A U T O / C O N F I G / I N I  A S  N E E D E D
;///////////////////////////////////////////////////////////////
switch05 = VerifyStartup(CheckAVConfig)
switch06 = VerifyStartup(CheckAVAuto)

#ifnot(switch05)
    goto(checkautoexec)                 
#endif

:updateconfig                           
#if(switch03)                           ; Boot drive support LFN?
    Backup(SaveConfigLFN)
#else
    Backup(SaveConfigSFN)
#endif

ModifyTextFile(ModifyConfig)

:checkautoexec
#ifnot(switch06)
    #ifnot(switch82)
	goto(checksysini)               ; No changes to autoexec needed
    #endif
#endif

:updateautoexec
#if(switch03)                           ; Boot drive support LFN?
    Backup(SaveAutoexecLFN)
#else
    Backup(SaveAutoexecSFN)
#endif

ModifyTextFile(ModifyAutoexec)

:checksysini

switch99=VerifyIni(CheckSymevnt)
#if(switch99)                           ; If Symevnt VxD being loaded in SYSTEM.INI
   #if(switch04)
      Backup(SaveSysiniLFN)
   #else
      Backup(SaveSysiniSFN)
   #endif

   DelFromIni(DelVxds)
#endif

:checkschedini                          ; Write the scheduler INI file
#if(switch81)                           ; Scheduler is being installed
    UpdateIni(AddNewSched)
#endif

;/////////////////////////////////////////////
;// A D D   N A V   R E G I S T R Y   I N F O
;/////////////////////////////////////////////
switch99 = IsOptionSelected(navw32)
#if(switch99)
   MergeRegFile(NavwReg)
#endif

switch99 = IsOptionSelected(navapw)
#if(switch99)
   MergeRegFile(NavapwReg)
#endif

switch99 = IsOptionSelected(Scheduler)
#if(switch99)
   MergeRegFile(SchedReg)
#endif

; MOREWORK: Rescue not working yet
; switch99 = IsOptionSelected(rescuew)
; #if(switch99)
;    MergeRegFile(RescuewReg)
; #endif

#ifnot(switch80)
   DeselectOption(NavapStart)      ; Inhibit creation of NAVAPW in
#endif                             ;   Startup group if not selected

#ifnot(switch81)
   DeselectOption(SchedStart)      ; Inhibit creation of Scheduler in
#endif                             ;   Startup group if not selected

;//////////////////////////////////////////////
;// C R E A T E   P R O G R A M   G R O U P S            
;//////////////////////////////////////////////
Groups()
; MOREWORK: Not copied from SIWNU.DLL yet
; CallProc( DoGroups )

;//////////////////////////////////
;//      R U N   R E S C U E   
;//////////////////////////////////
:RunRescue
; MOREWORK: no rescue yet so override switch83
switch83=FALSE
#if(switch83)
    CallProc(FloppyInDrive)
    #if (switch69)
	CallProc(FloppyDialog)
	goto(RunRescue)
    #endif
	Backup(RescueCopy)
	ExecChildProcess(RescueRun)
	Delete(RescueDel)
#endif

;//////////////////////////////
;//      C L E A N   U P
;//////////////////////////////
CallProcEx(UpdateInstFlag)
UpdateReg32(RegUpdate)

;////////////////////////////////////
;// P R E P A R E   F O R   E X I T
;////////////////////////////////////
switch73 = FALSE
; MOREWORK: If Install took over as the shell, must reboot
CallProc(Finished)

;/////////////////////////////////////////////////////////////////////
;// C H E C K   F O R   F L O P P Y   B E F O R E   R E B O O T I N G
;/////////////////////////////////////////////////////////////////////
:CheckForFloppy
#if(switch73)
    CallProc(FloppyInDrive)
    #if (switch69)
	CallProc(FloppyDialog)
	goto (CheckForFloppy)
    #endif  
#endif

;//////////////////////////////////////////
;// D E L E T E  L E F T O V E R  D L L S 
;//////////////////////////////////////////
:CleanupAndExit

Delete(CustDLLDel)
Delete(Leftovers)
#if(switch73)
    ExitRestart()
#else
    Exit()
#endif

End()

;###########################################################################
;##########End of process section. Begin sections referenced above##########
;###########################################################################

;***************************************************************************
;* SubProc Executed When Install Takes Over As Shell                       *
;***************************************************************************
[SubProc]
Backup(CustDLLCopy)            ; Copy custom dll to windows dir
DelFromIni(DelVxds)            ; Remove Symevnt from SYSTEM.INI
Delete(CustDLLDel)
Return()

;***************************************************************************
;* SetShell section                                                        *
;***************************************************************************
[SetShell]
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=SubProc

[SetShellSave]
win.ini, win.siw, WINDOWS, WINDOWS
system.ini, system.siw, WINDOWS, WINDOWS

[SetShellRestore]
system.siw, system.ini, WINDOWS, WINDOWS
win.siw, win.ini, WINDOWS, WINDOWS

[LoadedList]
symnav7.dll
s32nav7.dll
symevnt1.dll
s32evnt1.dll

[SetShellMessage]
caption  =  "Norton AntiVirus for Windows 95 - Install Program"
"Welcome to the Norton AntiVirus Installation"
"program. Please select OK to allow Install"
"to restart Windows and continue the"
"installation. Press Cancel to exit Install."

;***************************************************************************
;* External function calls                                                 *
;***************************************************************************

[WrongVersion]
dll = siwnav16.dll
function = WrongVersionDialog

[Welcome]
dll = siwnav16.dll
function = WelcomeDialog

[DuringScan]
dll = siwnav16.dll
function = DuringScanDialog

[AfterScan]
dll = siwnav16.dll
function = AfterScanDialog

[Register]
dll = siwnav16.dll
function = RegisterDialog

[CompressedDrive]
dll = siwnav16.dll
function = CompressedDialog

[InstallType]
dll = siwnav16.dll
function = InstallTypeDialog

[SpecifyLocation]
dll = siwnav16.dll
function = SpecifyLocationDialog

[CopyFiles]
dll = siwnav16.dll
function = CopyFilesDialog

[StartupDlg]
dll = siwnav16.dll
function = StartupDialog

[RescueDlg]
dll = siwnav16.dll
function = RescueDialog

[Finished]
dll = siwnav16.dll
function = FinishDialog

[NoDiskSpace]
dll = siwnav16.dll
function = NoDiskSpaceDialog

[FindSymevntDll]
dll = siwnav16.dll
function = FindSymevnt

[NukeSymevntDll]
dll = siwnav16.dll
function = NukeSymevnt

[CheckLFNTarget]
dll = siwnav16.dll
function = DriveSupportsLFN
location = TARGET

[CheckLFNCDrive]
dll = siwnav16.dll
function = DriveSupportsLFN
location = C

[CheckLFNWindows]
dll = siwnav16.dll
function = DriveSupportsLFN
location = WINDOWS

[FindSharedComponents]
dll = siwnav16.dll
function = FindSharedComponents

[CheckPrevVer]
dll = siwnav16.dll
function = CheckPrevVerPath

[UpdateInstFlag]
dll = siwnav16.dll
function = UpdateInstalledFlag

[UsageCounts]
dll = siwnav16.dll
function = UpdateUsageCounts

[GetShort]
dll = siwnav16.dll
function = ConvertToShortName

; MOREWORK:
;[ConfigureNAV]
;dll = siwnav16.dll
;function = NAVStartUpOptions

[CheckWinSpace]
dll = siwnav16.dll
function = WindowsDriveSpace               

[NoWinSpace]
dll = siwnav16.dll
function = NoWindowsSpaceDialog

[SearchInfo]
dll = siwnav16.dll
function = SearchDialog

[InitMemory]
dll = siwnav16.dll
function = InitMemory

; MOREWORK:
[DoGroups]
dll = siwnav16.dll
function = CreateGroupItems

[FloppyInDrive]
dll = siwnav16.dll
function = IsFloppyInDrive

[FloppyDialog]
dll = siwnav16.dll
function = RemoveFloppyDialog

;***************************************************************************
;* Dialog Info                                                             *
;***************************************************************************

; MOREWORK: Still needed?
[NAVCopy:TypeSelect]
count = 2
caption = "Norton AntiVirus for Windows 95 Install Type"
text = "Please select the type of install you want to perform."
grouptext = "Install Types"
button1 = "&Full Install"
button2 = "C&ustom Install"
descrip1 = "Installs and configures complete AntiVirus protection for your computer.  This will require xx.x MB of disk space."
descrip2 = "Lets you choose which Norton AntiVirus modules to install.  If you need more options later, you can run install again."

; MOREWORK: Still needed?
[NAVCopy:Primary]
caption = "Norton AntiVirus for Windows 95 Main Selection"
button1 = "Select..."
button2 = "Select..."
button3 = "Select..."
button4 = "Select..."
button5 = "Select..."
text = App1Text
DisableButtons = 0

[App1Text]
"Please select the items you want to install.  If a selection"
"has a button to the right, you can select individual files or"
"components."

[NAVCopy:Component]
caption = "Norton AntiVirus for Windows 95 Component Selection"
text    = "Select/Deselect the components you want to install.  Checked items will be installed."

[NAVCopy:CopyDialog]
caption = "Copying Norton AntiVirus Files..."
posx = -10
posy = -10

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

[AdvoText]
"Please take a moment to complete the Product Registration Card
"included with your product and return it to Symantec."
""
"This will ensure that you receive future product announcements"
"and important notices. It will also qualify you for any discounts"
"on future upgrades."
""
"Thank you for purchasing Norton AntiVirus for Windows 95!"

;***************************************************************************
;* Message Text                                                            *
;***************************************************************************

; MOREWORK: Still needed?
[VersionSearch]
caption =  "Searching for Previous Version"
text1   =  "Searching for a previously installed"
text2   =  "version of Norton AntiVirus for Windows 95."
appname =  "navw32.exe"
apppath =  "C:\Program Files\Norton AntiVirus"

; MOREWORK: Still needed?
[SymantecDir]
caption = "Searching for Shared Directory"
text1 = "Searching for Symantec shared"
text2 = "program folder."
appname = "symcfg.bin"
apppath = C:\SYMANTEC

; MOREWORK: Still needed?
[TargetDriveLFN]
caption =  "Install Norton AntiVirus Files"
defpath =  "C:\Program Files\Norton AntiVirus"
text    =  "Please select the location where you want to install Norton AntiVirus."
reqspace=  "Approximate additional disk space required"

; MOREWORK: Still needed?
[TargetDriveSFN]
caption =  "Install Norton AntiVirus Files"
defpath =  "C:\NAV95"
text    =  "Please select the location where you want to install Norton AntiVirus."
reqspace=  "Approximate additional disk space required"

[FileCopy]
copycaption   =  "Installing Norton AntiVirus for Windows 95"
errorcaption  =  "Error Copying Files"
insertcaption =  "Insert Diskette"
Message       =   MessageText

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

[CancelShell]
caption = "Norton AntiVirus - Exit Install"
"You have selected to cancel Install."
"In order to reset the Windows"
"environment, Install will also close"
"Windows.  Are you sure you want to exit?"

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

;***************************************************************************
;* Target Folder Settings                                                  *
;***************************************************************************

[TargetLFN]
reset = TARGET
location = "C:\Program Files\Norton AntiVirus"

[TargetShort]
reset = TARGET4
location = %s, TARGET

[TargetSave]
reset = TARGET3
location = %s, TARGET4

[TargetExt]
reset = TARGET2
location = "System"
relative = 1
relativeto = TARGET

[TargetExtLFN]
reset = TARGET2
location = "System"
relative = 1
relativeto = TARGET

[TargetExtShort]
reset = TARGET4
location = %s, TARGET2

[TargetShared]
reset = TARGET3
location = %s, TARGET5

[TargetSharedShort]
reset = TARGET4
location = %s, TARGET3

[TargetSharedSave]
reset = TARGET5
location = %s, TARGET4

[CreateExtDir]
%s, TARGET2

[CreateSharedDir]
%s, TARGET3

;***************************************************************************
;* File backup                                                             *
;***************************************************************************
 
[SaveConfigSFN]
c:\config.sys, c:\config.nav

[SaveConfigLFN]
c:\config.sys, "c:\Copy of Config.Sys (before NAV install).BAK"

[SaveAutoexecSFN]
c:\autoexec.bat, c:\autoexec.nav

[SaveAutoexecLFN]
c:\autoexec.bat, "c:\Copy of Autoexec.Bat (before NAV install).BAK"

[SaveSysIniSFN]
system.ini, system.nav, WINDOWS, WINDOWS

[SaveSysIniLFN]
system.ini, "Copy of System.Ini (before NAV install).BAK", WINDOWS, WINDOWS

[CustDLLCopy]
siwnav16.dll, siwnav16.dll, SOURCE, WINDOWS
scaninst.dll, scaninst.dll, SOURCE, WINDOWS
symnav7.dll,  symnav7.dll,  SOURCE, WINDOWS
virscan.dat,  virscan.dat,  SOURCE, WINDOWS
virscan.inf,  virscan.inf,  SOURCE, WINDOWS
inscanm.inf,  inscanm.inf,  SOURCE, WINDOWS
inscanb.inf,  inscanb.inf,  SOURCE, WINDOWS
inscanf.inf,  inscanf.inf,  SOURCE, WINDOWS

[SymevntFind]
symevnt.386, SYSTEM
symevnt1.dll, SYSTEM

[SymevntCopy]
symevnt.386, symevnt.386, TARGET3, SYSTEM
symevnt1.dll, symevnt1.dll, TARGET3, SYSTEM

[RescueCopy]
rescue32.exe, rescue32.exe, TARGET3, TARGET4
s32stat.dll, s32stat.dll, TARGET5, TARGET4

[RescueRun]
"%s\rescue32.exe /REGMSG", TARGET4

;***************************************************************************
;* Delete Files                                                            *
;***************************************************************************

[RescueDel]
rescue32.exe, TARGET4
s32stat.dll,  TARGET4

[CustDLLDel]
siwnav16.dll, WINDOWS
scaninst.dll, WINDOWS
symnav7.dll,  WINDOWS
virscan.dat,  WINDOWS
virscan.inf,  WINDOWS
inscanm.inf,  WINDOWS
inscanb.inf,  WINDOWS
inscanf.inf,  WINDOWS

[Leftovers]
win.siw,      WINDOWS
system.siw,   WINDOWS

;***************************************************************************
;* Config/Autoexec/Ini Mods                                                           *
;***************************************************************************

[CheckAVConfig]
file = c:\config.sys
findrems = 0
finditems = FindNavStartup
filetype = config

[CheckAVAuto]
file = c:\autoexec.bat
findrems = 0
finditems = FindNavStartup
filetype = autoexec

[FindNavStartup]
; MOREWORK: Add other AV programs including NOVI, UTScan, etc.
*nav_.sys*
*nav&.sys*
*nav.exe*
*navtsr.exe*

[ModifyConfig]
caption    = "Norton AntiVirus - Modify Config.sys File"
text1      = "The following modifications need to be made to your config.sys file.  To edit the file, click the Edit button."
FileSpec   = c:\config.sys
filetype   = config
rem1       = "rem"
rem2       = 
rem3       = 
rem4       =
FindRems   = 0
EditCaption= "Edit Config.sys"
EditText   = "Make the desired changes to the file and click Done when finished.  To cancel this and all previous edits, click Cancel Edit."
AddPath    = 
DelItems   = StartupDelItems

[ModifyAutoexec]
caption    = "Norton AntiVirus - Modify Autoexec.bat File"
text1      = "The following modifications need to be made to your autoexec.bat file.  To edit the file, click the Edit button."
FileSpec   = c:\autoexec.bat
filetype   = autoexec
rem1       = "rem"
rem2       = 
rem3       = 
rem4       =
FindRems   = 0
EditCaption= "Edit Autoexec.bat"
EditText   = "Make the desired changes to the file and click Done when finished.  To cancel this and all previous edits, click Cancel Edit."
AddPath    =
DelItems   = StartupDelItems
AddItems   = StartupAddItems

[AddNewSched]
IniName = schedule.ini
SectionName = NamedEvents
NamedEvent1 = 1

SectionName = NamedEvent1
Name="Scan for Viruses"
Prompt="&What to Scan:"
CommandLine=NAVW32.EXE
StartupDir=%s, TARGET4
RunStyle=1

[StartupDelItems]
*nav_.sys*
*nav&.sys*
*nav.exe*
*navtsr.exe*

[StartupAddItems]
"%s\Navboot.exe /Startup", TARGET3, switch82
 
[CheckSymevnt]
Ininame = system.ini
SectionName = 386enh
device = *symevnt.386*

[DelVxds]
IniName = system.ini
SectionName = 386enh
device=*symevnt.386*
device=*navap.vxd*

;***************************************************************************
;* Reg Database mods                                                       *
;***************************************************************************

[NavReg]
file = %s\nav95.reg, TARGET2

[NavwReg]
file = %s\navw32.reg, TARGET2

[NavapwReg]
file = %s\navapw32.reg, TARGET2

[SchedReg]
file = %s\NSched32.reg, TARGET2

[RegUpdate]
key = "HKEY_LOCAL_MACHINE"
subkey = "SOFTWARE\Symantec\Norton AntiVirus\Install\95\Components"

;***************************************************************************
;* Misc install functions                                                  *
;***************************************************************************

[Pix]
color = %s\luigi.bmp, 1, -1
color = %s\symlogo.rle, -1, 1

[VerDll]
ver.dll, SYSTEM

[SetNAVRegister]
s32nav7.dll, TARGET

[Registration]
dll = s32nav7.dll
string = "Symantec Install for Windows"
active = no
serialize = 0

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

[groups]
"Norton AntiVirus", nav.grp, DELETE
"Startup",          startup.grp

[Norton AntiVirus]
"Norton AntiVirus",           navw32.exe,     navw32,    0, TARGET3, navw32.exe,   TARGET3, " "
"Schedule Scans",             nsched32.exe,   scheduler, 0, TARGET3, nsched32.exe, TARGET3, " "
"Automatic Virus Protection", navapw.exe,     navapw,    0, TARGET3, navapw.exe,   TARGET3, " "

[Startup]
"Run Scheduled Scans",     nsched32.exe, schedstart, 0, TARGET3, nsched32.exe, TARGET3, " "
; "Automatic Virus Protect", navapw.exe,   navapstart, 0, TARGET3, navapw.exe,   TARGET3, " "

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

[NAVCopy]
;seltype.component, description,                        size,req,files,show
CopyMain.BaseFiles, "Norton AntiVirus Base Files - %ldK",  0,  Y, N, Y
CopySub.navapstart, " "
CopySub.schedstart, " "
CopyMain.NAVWIN,    "Windows Protection          - %ldK",  0,  N, Y, Y
CopySub.navw32,     "Windows Scanner Application - %ldK"
CopySub.navapw,     "Automatic Protection VxD    - %ldK"
CopyMain.NAVDOS,    "DOS/Startup Protection      - %ldK",  0,  N, Y, Y
CopySub.navboot,    "NAVBOOT                     - %ldK"
CopySub.navtsr,     "NAVTSR                      - %ldK"
CopyMain.VIRDEFS,   "Virus Definitions           - %ldK",  0,  N, N, Y
CopyMain.TOOLS,     "Tools                       - %ldK",  0,  N, Y, Y
CopySub.install,    "Install/Uninstall NAV       - %ldK"
CopySub.rescue,     "Create rescue disks         - %ldK"
CopySub.scheduler,  "Schedule scans              - %ldK"


