; Master HPI file

[version]
signature=hpi
version=3.2

[includes]
count=3
1=inc.hpi
2=install.hpi
3=driver.hpi


[components]
count=0

; *************************
; *                       *
; * AddPrinter            *
; *                       *
' *************************

[addprinter]
1=log,         logheader
2=set,         ap_macro, setmacro10
3=copyfile,    icm
4=hpi,         addpr
5=set,         license_check
6=ui,          $if,^$license_accepted^$,!=,1,ap_license,$
7=addreg,      installstate, $if,^$license_accepted^$,!=,1,aplicense,$
8=log,         logfooter
count=8

[ap_license]
sequence=11

[setmacro10]
1=10ap,$10$
2=10,$11$

[ap_macro]
1=ap,true

[icm]
1=hpdesk.icm,$11$,,hpdesk.icm,$23$
2=hpdesk.icm,$11$,,hpdesk.icm,$22$

[addpr]
1=driver.hpi,$if,^$os^$,==,winnt4,addprinter:main:ms13:nt4:simple,addprinter:main:ms13:9x:simple$,false

[aplicense]
1=, $softwarepath$, $softwaresubpath$\Install, License, $if,^$license^$,==,accept,1,0$


[license_check]
1=license_accepted_lookup,$reglookup, HKLM, ^$softwarepath^$\^$softwaresubpath^$\Install, License$
2=license_accepted,$if,^$lang^$,!=,nec,^$license_accepted_lookup^$,1$
count=2

; *************************
; *                       *
; * Install               *
; *                       *
' *************************

[install]
1=hpi, preboothpi
count=1 

[preboothpi]
1=master.hpi,preboot
count=1

; *************************
; *                       *
; * PreBoot               *
; *                       *
' *************************

[preboot]
1=log,             logheader
2=background,      background_on
3=set,             set_section, setup_preboot_macros
4=ui,              $if, ^$os^$, ==, winnt4, ntadminui, ,$
5=setupcomponents, preboot_component_setup
6=ui,              installui
7=statuson,        preboot_statuson
8=addreg,          setupinstall
9=hpi,             $if, ^$os^$, ==, winnt4, confighpi, ,$
;10=hpi, $if,^$usb^$,==,true,usbhpi,,$
10=installfiles,    preboot:installfiles
11=component 
12=addreg,         installstate
13=setupcomponents,postbootbundle_component_setup
14=statusoff,
15=log,            logfooter
16=set,            checkfordriverreboot
17=ui,             $if,^$dontdodriverreboot^$,==,true,,restartui,$
18=UpdateIni,      $if,^$restart^$,!=,true,cancel_postboot,$
19=hpi,            $if,^$restart^$,!=,true,preboot_gotopostboot,$
20=restart,        $if,^$restart^$,==,true,restart,$
21=background,     background_off  
count=21

[confighpi]
1=driver.hpi, preboot:config_for_install, gosub
count=1

[checkfordriverreboot]
1=dontdodriverreboot, $if,^$lang^$,!=,nec,^$usb^$,true,$

[ntadminui]
sequence=4

[set_section]
1=cancel_warning,true

[setup_preboot_macros]
1=showereg,false
2=bundlemode,multi
3=ap, false
4=license_flag,$if,^$lang^$,!=,nec,true,false,$
5=restart,false
6=reboot_batch, true
7=10ap,$10$
8=id_web_installed, false


[preboot_component_setup]
file=$0$\master.hpi
section=preboot
mode=multi

[postbootbundle_component_setup]
file=$0$\master.hpi
section=postbootbundle
mode=multi

[installui]
sequence=1

[preboot_statuson]
CancelButton=1

[cancel_postboot]
1=hpfsched.ini,$10$,,Postboot_$product$,Enable,FALSE

[preboot_gotopostboot]
1=master.hpi,postboot,goto
                     
[preboot:installfiles]

; *************************
; *                       *
; * PostBoot              *
; *                       *
' *************************

[postboot]
1=background,  background_on
2=set,         postboot_macros,setup_postboot_macros
3=ui,          congratsui
4=hpi,         $if, ^$showereg^$,==,true,postboot_gotodoereg,,$
5=hpi,         $if, ^$showbundledialog^$,==,true,hpi_postbootbundle,,$
6=set,         set_id_web_macros
7=ui,          $if,^$id_web_installed^$,==,true,id_web_ui,$
8=background,  background_off  
9=hpi,        run_alt_shell_goto
10=DelFile,     delinstallerfromtemp
count=10

[delinstallerfromtemp]
1=hpistr.hpi,$2$,,delayed

[postboot_macros]
1=showereg, $if, ^$mode^$,==,cdrom,^$showereg^$,false$
2=showbundledialog, $if, ^$mode^$,==,cdrom,^$showbundledialog^$,false$

[postboot_gotodoereg]
1=master.hpi,doereg,goto

[setup_postboot_macros]
1=isnotnt, $if, ^$os^$, !=, winnt4, true, false, $
2=commtesta, $if, ^$pnum^$, ==, 13, ^$isnotnt^$, true, $
3=commtestb, $if, ^$pnum^$, ==, 14, ^$isnotnt^$, ^$commtesta^$, $
4=commtestc, $if, ^$pnum^$, ==, 20, false, ^$commtestb^$, $
5=commtest, $if, ^$usb^$, ==, true, false, ^$commtestc^$, $
6=bundlemode, multi
7=cancel_warning,false
8=bundle_reboot_required,false
9=reboot_batch, false


[congratsui]
sequence=5

[bundledui]
sequence=6

[postboot_statuson]
CancelButton=1

; *************************
; *                       *
; * Bundled               *
; *                       *
' *************************

[bundled]
1=background,     background_on
2=ui,             insert_cd_ui
3=set,            set_id_ad_macros
4=ui,             $if, ^$displayinstantdeliveryad^$, ==, true, instant_delivery_ad, $ 
5=set,            setup_bundled_macros
6=setupcomponents,bundled_component_setup
7=set,            check_ereg_registered_flags_$bits$
8=ui,             bundledui
9=statuson,       bundled_statuson
10=component
11=statusoff,
12=hpi,           bundle_check_reboot
count=12

[setup_bundled_macros]
1=bundlemode,single
2=cancel_warning,false
3=bundle_reboot_required,false
4=reboot_batch, false

[bundled_component_setup]
file=$0$\master.hpi
section=bundled
mode=single

[insert_cd_ui]
sequence=10

; *************************
; *                       *
; * Uninstall             *
; *                       *
' *************************

[uninstall]
1=log,         logheader
2=background,  background_on
3=set,         setup_uninstall_macros
4=ui,          $if,^$os^$,==,winnt4,ntadminui,,$
5=ui,          uninstallui
6=statuson,    uninstall_statuson
7=AddReg,      uninstallstate
8=component
9=statusoff,
10=log,         logfooter
11=ui,         restartui
12=restart,    $if,^$restart^$,==,true,restart,$
13=background, background_off
count=13

[setup_uninstall_macros]
1=reboot_batch, true

[background_on]
control=1
rgbtop=0,13,207
rgbbottom=0,204,202

[background_off]
control=0

[uninstallui]
sequence=2

[restartui]
sequence=3

[bundled_statuson]
CancelButton=1

[uninstall_statuson]
CancelButton=0

[restart]

[logheader]
1=date = $date$
2=time = $time$
3=o/s = $os$ $os_major$.$os_minor$ (build $os_build$)
4=cpu = $cpu$
5=RAM = $ram$ bytes 
6=User = $username$
count=6

[logfooter]
1=Time = $time$
count=1

[setupinstall]
1=, $softwarepath$, $softwaresubpath$\Install, SetupInstall,  1

[installstate]
1=, $softwarepath$, $softwaresubpath$\Install, InstallState,  1

[uninstallstate]
1=, $softwarepath$, $softwaresubpath$\Install, InstallState,  0


; *************************
; *                       *
; * InstEreg              *
; *                       *
' *************************


[instereg]
1=log,         logheader
2=component
3=run,         runereg
4=log,         logfooter
count=4



; *************************
; *                       *
; * DoEReg                *
; *                       *
' *************************

[doereg]
1=set,       setup_doereg_macros, check_ereg_registered_flags_$bits$ 
2=addreg,    $if,^$bits^$,==,32,clear_ereg_reg_hooks,,$ 
3=updateini, $if,^$bits^$,==,16,clear_ereg_ini_hooks,,$ 
4=run,       $if,^$ereg_registered^$,!=,1,runereg,$
5=hpi,       $if,^$ereg_registered^$,==,1,hpi_postbootbundle,$ 
6=waitreg,   $if,^$bits^$,==,32,wait_ereg_reg,,$ 
7=waitini,   $if,^$bits^$,==,16,wait_ereg_ini,,$ 
8=hpi,       hpi_postbootbundle 
count=8

[setup_doereg_macros]
1=reboot_batch, false
2=useeregproducta, $if, ^$product^$, ==, 610C, false, true, $
3=useeregproductb, $if, ^$product^$, ==, 810C, false, ^$useeregproducta^$, $
4=useeregproductc, $if, ^$product^$, ==, 815C, false, ^$useeregproductb^$, $
5=useeregproduct,  $if, ^$product^$, ==, 830C, false, ^$useeregproductc^$, $
6=eregproduct, $if, ^$useeregproduct^$, ==, true, ^$product^$, none,$

[clear_ereg_reg_hooks]
1=HKLM, $softwarepath$, Hewlett-Packard\$divid$\EReg\1.0\$eregproduct$\EregFinished, ,0,

[clear_ereg_ini_hooks]
1=hpfinst.ini,$10$,,Ereg^,1.0^,$eregproduct$,EregFinished, 0, DWORD

[runereg]
1=$eregroot$\ereg\iqplayer.exe

[wait_ereg_reg]
1=HKLM, $softwarepath$\Hewlett-Packard\$divid$\EReg\1.0\$eregproduct$\EregFinished,,1,value

[wait_ereg_ini]
1=$10$\hpfinst.ini,Ereg^,1.0^,$eregproduct$,EregFinished,1,value

[check_ereg_registered_flags_16]
1=ereg_16_registered,$inilookup, Ereg^^,1.0^^,^$product^$,Registered,hpfinst.ini,^$10^$,,$
2=dogz_enu,$if,^$ereg_16_registered^$,==,1,true,false$
3=dogz_fra,$dogz_enu$
4=dogz_enu,$if,^$lang^$,==,enu,^$dogz_enu^$,false$
5=dogz_fra,$if,^$lang^$,==,fra,^$dogz_fra^$,false$
6=ereg_registered,$ereg_16_registered$
count=6

[check_ereg_registered_flags_32]
1=ereg_32_registered,$reglookup, HKLM, SOFTWARE\Hewlett-Packard\^$divid^$\EReg\1.0\^$eregproduct^$\Registered,,$
2=dogz_enu,$if,^$ereg_32_registered^$,==,1,true,false$
3=dogz_fra,$dogz_enu$
4=dogz_enu,$if,^$lang^$,==,enu,^$dogz_enu^$,false$
5=dogz_fra,$if,^$lang^$,==,fra,^$dogz_fra^$,false$
6=ereg_registered,$ereg_32_registered$
count=6


; *************************
; *                       *
; * PostBootBundle        *
; *                       *
' *************************
[hpi_postbootbundle]
1=master.hpi,postbootbundle,goto

[postbootbundle]
1=set,        setup_postboot_macros
2=ui,         insert_cd_ui
3=set,        set_id_ad_macros
4=ui,         $if, ^$displayinstantdeliveryad^$, ==, true, instant_delivery_ad, $ 
5=set,        check_ereg_registered_flags_$bits$
6=ui,         bundledui
7=component
8=set,        set_id_web_macros
9=ui,         $if,^$id_web_installed^$,==,true,id_web_ui,$
10=hpi,       bundle_check_reboot
count=10


; ********************************
; *                              *
; * Instant Delivery Web Dialog  *
; *                              *
' ********************************

[set_id_web_macros]
1=action_button,$0$\instdlv.url
2=large_logo,instdlv.bmp
3=component_name,HP Instant Delivery

[id_web_ui]
sequence=12


; ******************************************
; *                                        *
; * Instant Delivery Advertisement Dialog  *
; *                                        *
' ******************************************
[set_id_ad_macros]
1=action_button,$0$\instdlv.url
2=large_logo,$4$\$lang$\id\instdlv.bmp
3=component_name,HP Instant Delivery

[instant_delivery_ad]
sequence=12




; *************************
; *                       *
; * Bundled Check Reboot  *
; *                       *
' *************************

[bundle_check_reboot]
1=master.hpi,bundlereboot,goto

[bundlereboot]
1=set,            setup_bundlereboot_macros
2=ui,             $if,^$bundle_reboot_required^$,==,true,restartui,$
3=restart,        $if,^$bundle_reboot_required^$,==,true,restart,$
4=set,            setdogz
5=background,     background_off  
6=hpi,            $if,^$dogz_enu^$,==,true,goto_rundogz,$
7=hpi,            $if,^$dogz_fra^$,==,true,goto_rundogz,$
8=hpi,            run_alt_shell_goto
count=8


[setup_bundlereboot_macros]
1=restart,false
2=reboot_batch, false

[setdogz]
1=dogz_enu,$if,^$restart^$,==,true,false,^$dogz_enu^$$

[goto_rundogz]
1=apps.hpi,rundogz,goto


; *************************
; *                       *
; * Run AltShell          *
; *                       *
' *************************

[run_alt_shell_goto]
1=master.hpi,run_alt_shell,goto

[run_alt_shell]
1=ui,             $if,^$altshell^$,==,true, insert_cd_ui,,$
2=run,            $if,^$altshell^$,==,true, exec_altshell,,$
count=2

[exec_altshell]
1=$4$\shell\printess.exe


; *************************
; *                       *
; * MakeDisk              *
; *                       *
' *************************

[makedisk]
1=background,  background_on
2=set,         setup_makedisk_macros
3=ui,          insert_cd_ui, makedisk1_ui
4=statuson,    statuson
5=makedisk,    makedisk
6=statusoff,   statusoff
7=ui,          makedisk2_ui
8=background,  background_off  
count=8

[setup_makedisk_macros]
1=reboot_batch, false

[makedisk1_ui]
sequence=7

[makedisk]

[makedisk2_ui]
sequence=8

; *************************
; *                       *
; * HPInfo                *
; *                       *
' *************************

[hpinfo]
1=ui,  hpinfoui
2=set, setup_hpinfo_macros
count=2

[hpinfoui]
sequence=9

[setup_hpinfo_macros]
1=reboot_batch, false




