;**************************************************************************
;* Norton Administrator Installation Script                               *
;* (c)1994 - Symantec, Peter Norton Group                                 *
;*                                                                        *
;* for use with the Symantec Install for Windows version 3.3              *
;**************************************************************************

[process]
; switch69 is true for install, false for uninstall
switch69 = TRUE

switch20 = exists(DllExists)

#ifnot(switch20)
   switch40 = backup(nadmindll)

   #ifnot(switch40)
       MessageBox(CopyCustError)
       Delete(FilesToDelete)

       switch41 = IsInstallShell()

       #if(switch41)
           ExitWindows()
       #else
           exit
       #endif
   #endif
#endif

Bitmaps(pix)
SetActiveCopy(nnucopy,install.inf)

; load Symnet
CallProc(LoadSymnet)

switch01 = IsRegistered()
#ifnot(switch01)
  Registration()
#endif

; switch91 = Automatic Installation
; switch92 = Custom Installation
SelectInstallType()
#if(switch92)
  PrimarySelect()
#endif

;if there was an old ini file, blast the data line
switch05 = Exists(NadminFileExists)
#if(switch05)
DelFromIni(NadminIniFile)
#endif
; get directories for console/agents/databases
CallProc(NetTargetDrive)

;set network files readwrite (to overwrite existing files)
CallProc(SetAllFilesToReadWrite)

; if the database files are to be copied...
switch42 = IsOptionSelected(data)
#if(switch42)
; if overwriting files, ask user
; if no existing files are found, overwrite
CallProc(VerifyAnyOverwrite)
#if(switch10)
    CallProc(RemoveTTSFlags)
#else
    switch11 = MessageYesNo(UpgradeYesNo)
    #ifnot (switch11)
        CallProc(FreeSymnet)
        Delete(FilesToDelete)
        switch41 = IsInstallShell()
        #if(switch41)
            ExitWindows()
        #else
            Exit
        #endif
    #endif
    CallProc(RemoveTTSFlags)
#endif

; create a license
CallProc(naLicenseCreator)
; toggle switch10 for copying files
not(switch10)

#endif
; if the database files are to be copied...

; copy files
copy()

; Set the user registration
SetRegistration(UserReg)

; create batch builder ini file
;UpdateIni(BBIniFile)
; copy to /agents directory
;backup(backupBBIniFile)

; let hammer initialize itself
; (now called in custom dll)
ExecChildProcess(LaunchHammer)

; see if user wants to modify the system login script
; non netware environments will skip this
;
; switch30 = Include Inventory Agent
; switch31 = Include Distribution Agent
; switch32 = Include Metering Agent
;
; switch15 = TRUE or FALSE depending upon OK or CANCEL
CallProc(FindLoginScript)

; callproc here to backup and remove flags for login script
; assumes file is in szExtStr1 (in CallProc.NetTargetDrive)
#if(switch15)

;change TARGET2 to UNC
CallProc(BackupTarget2)
CallProc(ChangeToUNC)

;CallProc(RemoveOldLoginScriptInfo)
CallProc(SetLoginScriptRW)
ModifyTextFile(LoginScript)
CallProc(SetLoginScriptRO)

; restore TARGET2 from UNC
CallProc(RestoreTarget2)

#endif

; reenable TSR if it's present
switch25 = CallProcEx(CheckTSR)

#if(switch25)
   CallProcEx(EnableTSR)
#endif

; free Symnet
CallProc(FreeSymnet)

;set network files readonly
;CallProc(SetFilesToReadOnly)

; setup windows groups
switch20 = IsOptionSelected.console

#if(switch20)
   groups()
#endif

;delete cust.dll
delete(FilesToDelete)

switch20 = IsInstallShell()
#if(switch20)
  End(ByeShell)
#else
  End(ByeNoReboot)
#endif

end

; SubProc to be executed before we take over as the shell

[SubProc]
Backup(nadmindll)

switch20 = CallProcEx(CheckTSR)

#if(switch20)
   CallProcEx(DisableTSR)
#endif

Return


;**************************************************************************
;* Disks                                                                  *
;**************************************************************************

[InstallVersion]
3.3

[CompressionChars]
LZW = "_"
ZIP = "$"

[FilesToDelete]
siwcust.dll, WINDOWS
symkrnl4.dll, WINDOWS
symdb4.dll,   WINDOWS
symnet4.dll,  WINDOWS
symnw34.dll,  WINDOWS
symbv44.dll,  WINDOWS
symlm24.dll,  WINDOWS
symls.dll,    WINDOWS
nautil.dll,   WINDOWS
symgui4.dll,  WINDOWS
symutil4.dll, WINDOWS

[BBIniFile]
;IniName                   = "%s\ebw.ini", TARGET2
;IniName                   = ebw.ini
;SectionName               = Extensions
;"Norton Basic Constant"   = "%s\symconst.ebl", TARGET2

[NadminIniFile]
IniName                    = %s\nadmin.ini, WINDOWS
SectionName                = Data
DefDataDir                 = "*"

[backupBBIniFile]
;ebw.ini, ebw.ini, WINDOWS, TARGET2

[LaunchHammer]
"%s\nadmin.exe /VIRGIN", TARGET

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

; %ld will be replaced at runtime by the install program

[nnucopy]
copymain.basefiles,    "Norton Administrator for Networks - %ldK",  0, Y, N, Y
copymain.console,      "&Console Utilities - %ldK",                 0, N, Y, Y
copysub.bbconsole,     "Symantec Basic - %ldK",                     0
copysub.helpconsole,   "Help Data Files - %ldK",                    0
copysub.viewersconsole, "Norton File Viewers - %ldK",               0
copysub.samples,       "Sample Files - %ldK",                       0

copymain.agent,        "&Agents - %ldK",                            0, N, Y, Y
copysub.nmetagent,     "Metering Agent - %ldK",                     0
copysub.ninvagent,     "Inventory Agent - %ldK",                    0
copysub.ndisagent,     "Distribution Agent - %ldK",                 0

copymain.data,         "&Database Files - %ldK",                    0, N, Y, Y
copysub.appdata,       "Application Database - %ldK",               0


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

[groups]
"Norton Administrator",        nadmin.grp,   DELETE

[Norton Administrator]
"Norton Administrator",                      nadmin.exe,        Console,,TARGET
"Symantec BASIC",                            sbedit.exe,        bbConsole,1,TARGET
"Remove Norton Administrator",               "install.exe /u",  Console,,TARGET

[nnucopy:copydialog]
caption = "Copying Files"
posx = -10
posy = -10

[nnucopy:TypeSelect]
count       = 2
caption     = "Norton Administrator for Networks - Installation Type"
text        = "Please select the installation type you prefer."
grouptext   = "Install Types"
button1     = "&Automatic Installation"
button2     = "&Custom Installation"
descrip1    = "Installs the entire Norton Administrator for Networks package with all Tools and Utilities."
descrip2    = "Lets you choose which modules to install now.  If you need to add more options later, you can re-install."

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

[nnucopy:Advo]
posx = 10
posy = 50
location = siwcust.dll
count = 1
BitmapsOnly = 1

[primarytext]
"Use the 'Files...' button to deselect console, agent, or database files."

[nnucopy:Component]
caption = "Norton Administrator for Networks - Component Selection"
text = "Please choose the components you wish to install.  Highlighted items are selected."
Cancel = "Cancel"

[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."


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

[ByeShell]
caption = "Installation Complete"
"This concludes the installation of"
"Norton Administrator for Networks."
" "
"Please review the README.TXT file for any last"
"minute additions and/or corrections to the documentation."
" "
"Select one of the exit options."
" "

[ByeNoReboot]
caption = "Installation Complete"
"This concludes the installation of "
"Norton Administrator for Networks."
" "
"Please review the README.TXT file for any last"
"minute additions and/or corrections to the documentation."
" "
"Select one of the exit options."
" "

[TargetBrowse]
caption = "Browse Directories"
DefaultDir = C:\

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

[FileCopy]
copycaption   =  "Installing Norton Administrator for Networks"
errorcaption  =  "Error Copying Files"
insertcaption =  "Insert Diskette"

[cancel]
caption = "Norton Administrator for Networks"
text    = "Are you sure you want to exit?"

[cancelshell]
caption = "Norton Administrator for Networks"
"When you Cancel Install, Windows"
"will exit to the DOS prompt so"
"that the Windows environment can"
"be reset."
""
"Are you sure you want to exit?"

[CopyCustError]
caption = "Copy Error"
"There was an error copying some temporary files"
"to your Windows directory.  The problem may be"
"due to insufficient disk space.  Please correct"
"the problem and rerun Install."

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

[nadmindll]
siwcust.dll, siwcust.dll, SOURCE, WINDOWS
symkrnl4.dll, symkrnl4.dll, SOURCE, WINDOWS
symdb4.dll,   symdb4.dll,   SOURCE, WINDOWS
symnet4.dll,  symnet4.dll,  SOURCE, WINDOWS
symnw34.dll,  symnw34.dll,  SOURCE, WINDOWS
symbv44.dll,  symbv44.dll,  SOURCE, WINDOWS
symlm24.dll,  symlm24.dll,  SOURCE, WINDOWS
symutil4.dll, symutil4.dll, SOURCE, WINDOWS
symls.dll,    symls.dll,    SOURCE, WINDOWS
nautil.dll,   nautil.dll,   SOURCE, WINDOWS
symgui4.dll,  symgui4.dll,  SOURCE, WINDOWS

[DllExists]
siwcust.dll,  WINDOWS
symkrnl4.dll, WINDOWS
symdb4.dll,   WINDOWS
symnet4.dll,  WINDOWS
symnw34.dll,  WINDOWS
symbv44.dll,  WINDOWS
symlm24.dll,  WINDOWS
symutil4.dll, WINDOWS
symls.dll,    WINDOWS
nautil.dll,   WINDOWS
symgui4.dll,  WINDOWS


[pix]
color = %s\nantext.rle, 1, 1
color = %s\symblue.rle, -1, 1
color = %s\anvil2.bmp, 1, -1

; custom dll functions
[NetTargetDrive]
dll = siwcust.dll
function = NetTargetCustomize

[NetWriteInstallData]
dll = siwcust.dll
function = NetWriteInstallData

[VerifyAnyOverwrite]
dll = siwcust.dll
function = VerifyAnyOverwrite

[RemoveTTSFlags]
dll = siwcust.dll
function = RemoveTTSFlags

[SetLoginScriptRW]
dll = siwcust.dll
function = SetLoginScriptRW

[SetLoginScriptRO]
dll = siwcust.dll
function = SetLoginScriptRO

[RemoveOldLoginScriptInfo]
dll = siwcust.dll
function = RemoveOldLoginScriptInfo

[FindLoginScript]
dll = siwcust.dll
function = FindLoginScript

[ChangeToUNC]
dll = siwcust.dll
function = ChangeToUNC

[BackupTarget2]
dll = siwcust.dll
function = BackupTarget2

[RestoreTarget2]
dll = siwcust.dll
function = RestoreTarget2

[naLicenseCreator]
dll = siwcust.dll
function = naLicenseCreator

[InitHammer]
dll = siwcust.dll
function = InitHammer

[StartInitializing]
dll = siwcust.dll
function = StartInitializing

[EndInitializing]
dll = siwcust.dll
function = EndInitializing

[LoadSymnet]
dll = siwcust.dll
function = LoadSymnet

[FreeSymnet]
dll = siwcust.dll
function = FreeSymnet

[ExitHookProc]
dll = siwcust.dll
function = ExitHookProc

[NadminFileExists]
nadmin.ini, WINDOWS

[DllsExist]
siwcust.dll,   WINDOWS
symkrnl4.dll,  WINDOWS
symdb4.dll,    WINDOWS
symnet4.dll,   WINDOWS
symnw34.dll,   WINDOWS
symbv44.dll,   WINDOWS
symlm24.dll,   WINDOWS
symutil4.dll,  WINDOWS
symls.dll,     WINDOWS
nautil.dll,    WINDOWS
symgui4.dll,   WINDOWS

[UserReg]
nconapi.dll, TARGET

[CheckTSR]
dll = siwcust.dll
function = IsTSRPresent

[DisableTSR]
dll = siwcust.dll
function = DisableDosTSR

[EnableTSR]
dll = siwcust.dll
function = EnableDosTSR

[SetFilesToReadOnly]
dll = siwcust.dll
function = SetFilesToReadOnly

[SetAllFilesToReadWrite]
dll = siwcust.dll
function = SetAllFilesToReadWrite

[UpgradeYesNo]
caption     = "Norton Administrator for Networks"
"All existing databases need to be upgraded"
"to the current version.  After this conversion"
"only the latest version of Norton Administrator"
"for Networks will read the databases."
" "
"Do you wish to continue?"

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

[Registration]
caption =  "Norton Administrator for Networks -- Registration"
text1   =  regtext
text2   =  "&Name:"
text3   =  "&Company:"
Cancel  =  "Cancel"
Help    =  "&Help"
appname =  nconapi.dll
;appname2=  smedit.exe
string  =  "Symantec Install for Windows"
active  =  no
serialize = 1
dll       = siwcust.dll
function  = ElValidateoDaLaSerial

[regtext]
"Welcome to the Norton Administrator for Networks Installation."
" "
"Please enter your name, company, and serial number below."
" "
" "
"IMPORTANT:  Your serial number is located"
"either on the inside cover of your"
"manual or on your registration card."

;**************************************************************************
;* Login Script modifications                                             *
;**************************************************************************
[LoginScript]
caption    = "Modify Login Script File"
text1      = "The following line(s) need to be added to your Login Script file:"
FileSpec   =
FileType   = text
Rem1       = "Rem"
Rem2       = "Remark"
Rem3       = "*"
Rem4       = ";"
FindRems   = 1

RemItems   = LoginRemItems
DelItems   = LoginDelItems
AddItems   = LoginAddItems

[LoginRemItems]

[LoginDelItems]
*NORTON_ADMINISTRATOR*
*nainv.exe*
*nadist.exe*

[LoginAddItems]
"Rem Norton_Administrator_For_Networks"                           , APPEND
"#|s\nainv.exe",             TARGET2                   , switch30  , APPEND
"#|s\nadist.exe",            TARGET2                   , switch31  , APPEND

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

[SetShell]
AppIniName = hammer.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=SubProc

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

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

; for safety, always let install take over as the shell
[LoadedList]
ctl3d.dll
nadist.exe
nadistw.exe
nainv.exe
nameter.exe
nameterw.exe
nanode.exe
nanodew.exe
symkrnl4.dll
symdb4.dll
symutil4.dll
symgui4.dll
symls.dll
nautil.dll

[SetShellMessage]
caption = "Norton Administrator for Networks -- Install"
"Welcome to the Norton Administrator for"
"Networks installation program."
" "
"IMPORTANT:  Your serial number is located"
"either on the inside cover of your"
"manual or on your registration card."
" "
"Please press OK to allow Install"
"to restart Windows and continue"
"the installation.  Press Cancel to exit."

[WindowsVersion]
3.10
"Norton Administrator for Networks requires"
"Microsoft Windows version 3.1 or later."
