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

[process]
switch69 = TRUE                    ; Switch 69 is TRUE for install, FALSE
                                   ; for uninstall
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(nnlcopy,install.inf)


CallProc(LoadSymnet)               ; Initialize Symnet

Registration()                     ; User registration

SelectInstallType()                ; Select full or custom install

#if(switch92)
  PrimarySelect()
#endif

switch05 = Exists(NadminFileExists) ; Fix old .ini file

#if(switch05)
   DelFromIni(NadminIniFile)
#endif

switch70 = Exists(VwrIniExists)    ; Check for the symvwr ini file
switch72 = FALSE                   ; FALSE for normal install

CallProc(NetTargetDrive)           ; Get the installation paths

CallProc(SetAllFilesToReadWrite)   ; Set the network files to read/write

Copy()                             ; Copy the files

SetRegistration(UserReg)           ; Set the user registration

UpdateIni(CreateNEMIni)            ; Create the nem.ini file

ExecChildProcess(LaunchConsole)    ; Initialize the databases

; 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(inv)
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)
   ModifyTextFile(LoginScript)
   CallProc(SetLoginScriptRO)

   CallProc(RestoreTarget2)        ; Restore TARGET2
#endif

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

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

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

#if(switch25)
   CallProcEx(EnableTSR)
#endif

CallProc(FreeSymnet)               ; Let Symnet go

switch01 = CallProcEx(CreateJobs)  ; Create the distribution jobs

#ifnot(switch01)
   MessageBox(JobError)
#endif
                                   ; Create the icons
groups()
                                   ; Delete the custom DLL files
delete(FilesToDelete)

switch20 = IsInstallShell()

#if(switch20)
   End(ByeShell)
#else
   MessageBox(ByeNoReboot)
   exit()
#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


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

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

[nnlcopy]
copymain.console,    "Norton Administrator Console Files - %ldK", 0, Y, N, Y
copymain.meter,        "&Metering - %ldK",                        0, N, N, N
copymain.inv,          "&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",        nem.grp,     DELETE

[Norton Menu Manager]
"Norton Administrator Console",              nadmin.exe,        Console,,TARGET
"Symantec BASIC",                            sbedit.exe,        sb,    1,TARGET
"NEF Manager",                               nefmgr.exe,        console,,TARGET
"NEF Sender-Receiver",                       nefsr.exe,         console,,TARGET
"Remove Norton Administrator",               "install.exe",     Console,,TARGET,,,"/u"
"Distribution Agent",                        nadistw.exe,       dist,,   TARGET2


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

[Registration]
caption =  "Norton Menu Manager - Registration"
text1   =  regtext
text2   =  "&Name:"
text3   =  "&Company:"
Cancel  =  "Cancel"
Help    =  "&Help"
appname =  nconapi.dll
string  =  "Symantec Install for Windows"
active  =  no
serialize = 0

[regtext]
"Welcome to the Norton Menu Manager Installation."
" "
"NOTE: If you currently have an existing Norton"
"Administrator installation, we recommend installing"
"this pre-release test version of Norton Menu Manager"
"to a different location."
" "
"Please enter your name and company below."


[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"
"Norton Menu Manager."
" "
"Please review the README.TXT file for any last"
"minute additions and/or corrections to the"
"documentation."
" "
"Press OK to return to Windows."


[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
symkrnl7.dll, symkrnl7.dll, SOURCE, WINDOWS
symutil7.dll, symutil7.dll, SOURCE, WINDOWS
symgui7.dll,  symgui7.dll,  SOURCE, WINDOWS
symdb7.dll,   symdb7.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
ndq.dll,      ndq.dll,      SOURCE, WINDOWS
nefdb7.dll,   nefdb7.dll,   SOURCE, WINDOWS
neftfile.dll, neftfile.dll, SOURCE, WINDOWS
nemjob.dll,   nemjob.dll,   SOURCE, WINDOWS


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

[FilesToDelete]
siwcust.dll,  WINDOWS
symkrnl7.dll, WINDOWS
symutil7.dll, WINDOWS
symgui7.dll,  WINDOWS
symdb7.dll,   WINDOWS
symnet7.dll,  WINDOWS
symnw37.dll,  WINDOWS
symbv47.dll,  WINDOWS
symlm27.dll,  WINDOWS
symls.dll,    WINDOWS
nautil.dll,   WINDOWS
ndq.dll,      WINDOWS
nefdb7.dll,   WINDOWS
neftfile.dll, WINDOWS
nemjob.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

[UpdateCfg]
IniName = %s\nadmin.cfg, TARGET
SectionName = console
NoPromptOnExit = 1

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

[InstallVersion]
4.0

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

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

[LaunchConsole]
"%s\nadmin.exe /FIRSTTIME", TARGET


[DllExists]
siwcust.dll,  WINDOWS
symkrnl7.dll, WINDOWS
symutil7.dll, WINDOWS
symgui7.dll,  WINDOWS
symdb7.dll,   WINDOWS
symnet7.dll,  WINDOWS
symnw37.dll,  WINDOWS
symbv47.dll,  WINDOWS
symlm27.dll,  WINDOWS
symls.dll,    WINDOWS
nautil.dll,   WINDOWS
ndq.dll,      WINDOWS
nefdb7.dll,   WINDOWS
neftfile.dll, WINDOWS
nemjob.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"

[Nemjob-Win1]
nemdb.dll
nemprops.dll
nem.ini
nmenuw.exe
snmenuw.exe
nmwscr.scr
symgui7.dll
symkrnl7.dll
symutil7.dll
symnet7.dll
symnw37.dll
symbv47.dll
symlm27.dll
symdb7.dll
nefdb7.dll
instdos.exe
instdos.inf

[Nemjob-Dos1]
nmenu.bat
nm.exe
nem.ini


;**************************************************************************
;* 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

;**************************************************************************
;* 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\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]
;ctl3dv2.dll
nadist.exe
nadistw.exe
nainv.exe
nameter.exe
nameterw.exe
nanode.exe
nanodew.exe
symkrnl7.dll
symdb7.dll
symutil7.dll
symgui7.dll
symls.dll
nautil.dll

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