;**************************************************************************
;* Norton Enterprise Menuing Site Installation Script                     *
;* (c)1995 - Symantec, Peter Norton Group                                 *
;*                                                                        *
;* for use with the Symantec Install for Windows version 4.0+             *
;**************************************************************************

[process]
									; switch57 is FALSE if install is not
									; yet complete. it is set to TRUE when
									; install completes successfully.
switch57 = FALSE

switch69 = TRUE                    ; Switch 69 is TRUE for install, FALSE
                                   ; for uninstall
switch40 = backup(nadmindll)

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

Bitmaps(pix)
SetActiveCopy(nnlcopy,remote.inf)


CallProc(LoadSymnet)               ; Initialize Symnet
CallProc(LoadRemoteInstallDll)

									; read the information from the
									; site.inf file. this includes the
									; target directories, the log file
									; name, and other stuff. this must
									; be called BEFORE SetWANSource. also
									; it must be done before we can add
									; information to the log file.
CallProc(ReadWANInstallFile)

CallProc(DisplayInstallStatus)

									; switch91 = Automatic Installation
switch91 = TRUE
									; set network files readwrite
									; (to overwrite existing files)
CallProc(SetAllFilesToReadWrite)
									; we're assuming that it
									; is OK to overwrite database
									; files.
CallProc(RemoveTTSFlags)
									; toggle switch10 for copying files
switch70 = Exists(VwrIniExists)     ; Check for the symvwr ini file

not(switch10)

Copy()                              ; Copy the files

UpdateIni(CreateNEMIni)             ; Create the nem.ini file

									; copy the site database
CallProc(CopySiteDb)
									; modify the configuration files
									; switch72 is false for normal
									; install, true for remote install
switch72 = TRUE
CallProc(ModifyCfgFiles)

; 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

DeselectOption(hinv)
DeselectOption(sinv)
DeselectOption(meter)

CallProc(FindLoginScript)

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

#if(switch15)
   CallProc(BackupTarget2)
   CallProc(ChangeToUNC)           ; Change TARGET2 to UNC

   CallProc(SetLoginScriptRW)
   SilentModifyTF(LoginScript)
   CallProc(SetLoginScriptRO)

   CallProc(RestoreTarget2)        ; Restore TARGET2
#endif

								   ; create DATA subdirectories
CreateDirectory(DataInDir)
CreateDirectory(DataOutDir)
CreateDirectory(DataBinDir)
CreateDirectory(NemDir)
CreateDirectory(NemSys)
CreateDirectory(NemUser)

UpdateIni(AddNemToProdDesc)
UpdateIni(AddConsoleToProdDesc)
UpdateIni(AddDistToProdDesc)

switch01 = CallProcEx(CreateJobsSilent)  ; Create the distribution jobs


switch25 = CallProcEx(CheckTSR)    ; Re-enable the TSR

#if(switch25)
   CallProcEx(EnableTSR)
#endif
								; indicate that install completed
								; successfully.
switch57 = TRUE

CallProc(TellInstallWeAreDone)
CallProc(FreeRemoteInstallDll)
CallProc(FreeSymnet)               ; Let Symnet go

                                   ; Delete the custom DLL files
delete(FilesToDelete)

exit()
end()

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

[SubProc]
Backup(nadmindll)

switch20 = CallProcEx(CheckTSR)

#if(switch20)
   CallProcEx(DisableTSR)
#endif

Return


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

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

[nnlcopy]
copymain.console,    "Norton Administrator Console - %ldK",       0, Y, N, Y
copymain.meter,        "&Metering - %ldK",                        0, N, N, N
copymain.hinv,         "&Hardware Inventory - %ldK",              0, N, N, N
copymain.sinv,         "&Software Inventory - %ldK",              0, N, N, N
copymain.dist,         "&Distribution - %ldK",                    0, N, N, N
copymain.sb,           "Symantec &Basic - %ldK",                  0, N, N, Y


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

[nnlcopy:TypeSelect]
count       = 2
caption     = "Norton Menu Manager - Installation Type"
text        = "Please select the installation type you prefer."
grouptext   = "Install Types"
button1     = "&Automatic Installation"
button2     = "&Custom Installation"
descrip1    = "Installs all of the necessary files to run the Norton Menu Manager plus all accessories and tools."
descrip2    = "Lets you choose which modules to install now.  If you need to add more options later, you can re-install."

[nnlcopy:Primary]
caption = "Norton Menu Manager - Application Selection"
button1 = ""
button2 = "&Utilities..."
button3 = "F&iles..."
button4 = "Fi&les..."
text = primarytext

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

[primarytext]
"Checked options below will be installed"

[nnlcopy:Component]
caption = "Norton Menu Manager - Component Selection"
text = "Please check the components you wish to install."
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."

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

[groups]
"Norton Menu Manager",        nadmin.grp,   DELETE

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


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

[ByeShell]
caption = "Installation Complete"
"This concludes the installation of"
"Norton Menu Manager"
" "
"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 Menu Manager."
" "
"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 Menu Manager"
errorcaption  =  "Error Copying Files"
insertcaption =  "Insert Diskette"

[cancel]
caption = "Norton Menu Manager"
text    = "Are you sure you want to exit?"

[cancelshell]
caption = "Norton Menu Manager"
"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."

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

[JobError]
caption = "Norton Menu Manager"
"An error occured creating the distribution jobs"


;**************************************************************************
;* File backups                                                           *
;**************************************************************************

[nadmindll]
siwcust.dll, siwcust.dll, SOURCE, WINDOWS
remotins.dll, remotins.dll, SOURCE, WINDOWS
symnet7.dll,  symnet7.dll,  SOURCE, WINDOWS
symnw37.dll,  symnw37.dll,  SOURCE, WINDOWS
symbv47.dll,  symbv47.dll,  SOURCE, WINDOWS
symlm27.dll,  symlm27.dll,  SOURCE, WINDOWS
symls.dll,    symls.dll,    SOURCE, WINDOWS
nautil.dll,   nautil.dll,   SOURCE, WINDOWS
symkrnl7.dll, symkrnl7.dll, SOURCE, WINDOWS
symdb7.dll,   symdb7.dll,   SOURCE, WINDOWS
symutil7.dll, symutil7.dll, SOURCE, WINDOWS
symgui7.dll,  symgui7.dll,  SOURCE, WINDOWS


;**************************************************************************
;* File deletes                                                           *
;**************************************************************************

[FilesToDelete]
siwcust.dll,  WINDOWS
remotins.dll, WINDOWS
symnet7.dll,  WINDOWS
symnw37.dll,  WINDOWS
symbv47.dll,  WINDOWS
symlm27.dll,  WINDOWS
symls.dll,    WINDOWS
nautil.dll,   WINDOWS
symkrnl7.dll, WINDOWS
symdb7.dll,   WINDOWS
symutil7.dll, WINDOWS
symgui7.dll,  WINDOWS


;**************************************************************************
;* Ini file modifications                                                 *
;**************************************************************************

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

[CreateNEMIni]
IniName = %s\nem.ini, TARGET
SectionName = Database
path = %s, TARGET3

[AddNemToProdDesc]
IniName = %s\proddesc.inf, TARGET3
SectionName = "4306,1002"
flags=33808282118387

[AddConsoleToProdDesc]
IniName = %s\proddesc.inf, TARGET3
SectionName = "4304,1002"
flags=33808382118387

[AddDistToProdDesc]
IniName = %s\proddesc.inf, TARGET3
SectionName = "4303,1002"
flags=33808382118387

[AddSbToProdDesc]
IniName = %s\proddesc.inf, TARGET3
SectionName = "4305,1002"
flags=33808382118387


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

[InstallVersion]
4.0

[WindowsVersion]
3.10
"Norton Menu Manager requires"
"Microsoft Windows version 3.1 or later."

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

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


[DllExists]
siwcust.dll,  WINDOWS
remotins.dll, WINDOWS
symnet7.dll,  WINDOWS
symnw37.dll,  WINDOWS
symbv47.dll,  WINDOWS
symlm27.dll,  WINDOWS
symls.dll,    WINDOWS
nautil.dll,   WINDOWS
symkrnl7.dll, WINDOWS
symdb7.dll,   WINDOWS
symutil7.dll, WINDOWS
symgui7.dll,  WINDOWS

[NadminFileExists]
nadmin.ini, WINDOWS

[ViewerIniExists]
symvwr7.ini, TARGET

[CheckDistDB]
nadmin.dst, TARGET3

[UserReg]
nconapi.dll, TARGET

[DataInDir]
%s\DATA.IN, TARGET3

[DataOutDir]
%s\DATA.OUT, TARGET3

[DataBinDir]
%s\DATA.BIN, TARGET3

[NemDir]
%s\NEM, TARGET3

[NemSys]
%s\NEM\SYSTEM, TARGET3

[NemUser]
%s\NEM\USER, TARGET3

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

[ProductName]
Directory=NEM10
FullName="Norton Menu Manager V1.0"


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

[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

[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

[CreateJobs]
dll = nemjob.dll
function = NemInstallJobs

[CreateJobsSilent]
dll = nemjob.dll
function = NemSilentJobCreate

[LoadRemoteInstallDll]
dll = siwcust.dll
function = LoadRemoteInstallDll

[FreeRemoteInstallDll]
dll = siwcust.dll
function = FreeRemoteInstallDll

[SetWANSource]
dll = siwcust.dll
function = SetWANSourcePath

[ReadWANInstallFile]
dll = siwcust.dll
function = ReadWANInstallFile

[TellInstallWeAreDone]
dll = siwcust.dll
function = TellInstallWeAreDone

[DisplayInstallStatus]
dll = siwcust.dll
function = DisplayInstallStatus

[ModifyNadminCfg]
dll = siwcust.dll
function = ModifyNadminCfg

[ModifyNadminDat]
dll = siwcust.dll
function = ModifyNadminDat

[CopyConfigFiles]
dll = siwcust.dll
function = CopyConfigFiles

;**************************************************************************
;* 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.siw, WINDOWS
system.ini, system.siw, WINDOWS

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

; for safety, always let install take over as the shell
[LoadedList]

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