;****************************************************************************
; Script Switch Numbers
; SWITCH_PREVIOUS                            50
; SWITCH_NEXT                                51
; SWITCH_CANCEL                              52
;
; SWITCH_FINISH_RESTART                      60
;
; SWITCH_INSTALL_FILEMGR                     61
; SWITCH_INSTALL_AV                          62
; SWITCH_INSTALL_SYSDOC                      63
;
; SWITCH_EXISTS_FILEMGR                      64
; SWITCH_EXISTS_AV                           65
; SWITCH_EXISTS_SYSDOC                       66
;
; SWITCH_RESTOREDEFAULTS_FILEMGR             67
; SWITCH_RESTOREDEFAULTS_AV                  68
; SWITCH_RESTOREDEFAULTS_SYSDOC              69



[InstallVersion]
4.0

[process]
SetActiveCopy(PiledriverCopy, install.inf)
Backup(CustDLLCopy)
Bitmaps(Bitmaps)
DisableHelp()
CallProc(InitCustomDLL)

CallProc(KillRunningTasks)

CallProc(CheckForExistingComponents)

WizardPanel(WizWelcome, siwpldrv.dll)
WizardProcessPanel()

WizardPanel(WizSelectComponents, siwpldrv.dll)
WizardIncludePanel(WizSpecifyLocationFileMgr)
WizardProcessPanel()

WizardIncludePanel(WizSpecifyLocationFileMgr)
WizardPanel(WizSpecifyLocationFileMgr, siwpldrv.dll)
#if(switch61)
   WizardProcessPanel()
#else
   WizardExcludePanel(WizSpecifyLocationFileMgr)
#endif   


#if(switch61)
   SelectOption(FileManager)
#else
   DeselectOption(FileManager)
#endif

CallProc(GetSymantecDir)
CallProc(GetPiledriverDir)

WizardPanel(WizSetupReview, siwpldrv.dll)
WizardProcessPanel()

CreateDirectory(CreateFileMgrDirectory)
CreateDirectory(CreateSymantecDirectory)
CallProc(CreateShortNames)
CallProc(RegisterSharedLocation)

Copy()

#if(switch67)
   CallProc(DelRegKeyFileManager)
#endif

CallProc(RegisterComponents)
CallProc(RegisterUserInfo)

Groups(PiledriverGroups)

WizardPanel(WizFinished, siwpldrv.dll)
WizardProcessPanel()
#if(switch60)
   ExitRestart()
#else
   Exit()
#endif

End()


;###########################################################################
;###########################################################################

;***************************************************************************
;* SubProc Executed When Install Takes Over As Shell
;***************************************************************************

[subproc]
Backup(CustDLLCopy)            ; Copy custom dll to windows dir
Return()


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

[PiledriverCopy:CopyDialog]
caption = "Copying files..."
posx = -1
posy = -20


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

[cancel]
caption = "Exit Install?"
text    = "Are you sure that you want to exit?"

[cancelshell]
caption = "Exit Install?"
"You have chosen to cancel the Install"
"program. In order to reset the Windows"
"environment, Install will also restart"
"Windows. Are you sure you want to exit?"

[FileCopy]
copycaption             = "Installing Files"
errorcaption    = "Error Copying Files"
insertcaption   = "Insert Diskette"
Message                 = MessageText

[NotImplemented]
caption = "Feature Not Implemented"
"This feature has not yet been implemented."

[InsertDisk1]
caption="Error"
"Please insert Disk 1."

;***************************************************************************
;* File Exist verifications
;***************************************************************************


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

[CustDLLDel]
siwpldrv.dll,  TEMPDIR

[Leftovers]

[DeleteInstall]



;***************************************************************************
;* External function calls (DLL)                                           *
;***************************************************************************

[InitCustomDLL]
dll = siwpldrv.dll
function = InitCustomDLL

[ExitHookProc]
dll = siwpldrv.dll
function = ReleaseCustomDLL

[DelRegKeyFileManager]
dll=siwpldrv.dll
function=DelRegKeyFileManager

[CreateShortNames]
dll=siwpldrv.dll
function=CreateShortNames

[RegisterComponents]
dll=siwpldrv.dll
function=RegisterComponents

[CheckForExistingComponents]
dll=siwpldrv.dll
function=CheckForExistingComponents

[KillRunningTasks]
dll=siwpldrv.dll
function=KillRunningTasks

[bIsFileManagerHere]
dll=siwpldrv.dll
function=bIsFileManagerHere

[GetSymantecDir]
dll=siwpldrv.dll
function=GetSymantecDir

[GetPiledriverDir]
dll=siwpldrv.dll
function=GetPiledriverDir

[RegisterSharedLocation]
dll=siwpldrv.dll
function=RegisterSharedLocation

[RegisterUserInfo]
dll=siwpldrv.dll
function=RegisterUserInfo

[TestFunction]
dll=siwpldrv.dll
function=TestFunction


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

[Bitmaps]
color = %s\bigblu.rle
color = %s\symantec.rle, -1, -1

[PiledriverCopy:Advo]
posx = 20
posy = 20
location = siwpldrv.dll
count = 2
BitmapsOnly=1

[BrosweForPath]
caption="Select Path"

;***************************************************************************
;* Set Directories                                                         *
;***************************************************************************

[CreateFileMgrDirectory]
%s, TARGET

[CreateSymantecDirectory]
%s, TARGET4

;***************************************************************************
;* File backup                                                             *
;***************************************************************************

[CustDLLCopy]
siwpldrv.dll, siwpldrv.dll, SOURCE, TEMPDIR

;***************************************************************************
;* Autoexec Mods                                                           *
;***************************************************************************

;***************************************************************************
;* SetShell section                                                        *
;***************************************************************************

[SetShell]
WinIniName = win.ini
SystemIniName = system.ini
Message = MessageBox.SetShellMessage
SysSectionName = boot
WinSectionName = windows
shell = %s\setup.exe
load =
run =
SetShellIfLoaded=
Backup = Backup.SetShellSave
Restore = Backup.SetShellRestore
Active=no
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]

[SetShellMessage]
caption  =  "Piledriver Setup"
"Welcome to the Norton Piledriver for"
"Windows NT Setup.  Please select OK"
"to allow Setup to restart Windows and"
"continue the installation. Press"
"Cancel to exit Setup."


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

[PiledriverGroups]
"Piledriver", pldrvr.grp

[Piledriver]
"Norton File Manager",           filemgr.exe,      FileManager,,TARGET5,,,,TARGET5
"Uninstall Piledriver",          setup.exe,        RequiredFiles,1,TARGET5,inst32.exe,TARGET5,"/u",TARGET5

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

[PiledriverCopy]
;SelectionType.ComponentName,   "SelectionDlgText",                                             Size,   Required?,<Files>?,ShowItem?

CopyMain.RequiredFiles,                 "Required Files - %ldK",               0,                       Y,                              N,              Y
CopyMain.FileManager,               "File Manager - %ldK",                                 0,                   N,                      N,            Y

;***************************************************************************
;* Wizard Panels                                                           *
;***************************************************************************

[WizSamplePage]
Caption="Piledriver Setup"
Title="Sample Wizard Page"
DlgProc=PiledriverDlgProc
PanelDataProc=DefaultDataProc
ResourceId=100
Bitmap16=999
PanelFlags=First

[WizSpecifyLocationFileMgr]
Caption="Piledriver Setup"
Title="File Manager Location"
DlgProc=PiledriverDlgProc
PanelDataProc=DefaultDataProc
ResourceId=101
Bitmap16=999

[WizFinished]
Caption="Piledriver Setup"
Title="Setup Complete"
DlgProc=PiledriverDlgProc
PanelDataProc=DefaultDataProc
ResourceId=102
Bitmap16=999
PanelFlags=First+Last+Finish

[WizSelectComponents]
Caption="Piledriver Setup"
Title="Select Components"
DlgProc=PiledriverDlgProc
PanelDataProc=DefaultDataProc
ResourceId=105
Bitmap16=999
PanelFlags

[WizSetupReview]
Caption="Piledriver Setup"
Title="Setup Review"
DlgProc=PiledriverDlgProc
PanelDataProc=DefaultDataProc
ResourceId=106
Bitmap16=999

[WizWelcome]
Caption="Piledriver Setup"
Title="Welcome to Setup"
DlgProc=WelcomeDlgProc
PanelDataProc=WelcomeDataProc
Bitmap16=999
ResourceId=501
PanelFlags=First

[WizRestoreDefaultsFileMgr]
Caption="Piledriver Setup"
Title="Restore File Manager Defaults?"
DlgProc=PiledriverDlgProc
PanelDataProc=DefaultDataProc
ResourceId=108
Bitmap16=999
