This commit is contained in:
Dennis Trinks
2015-04-21 16:04:58 +02:00
parent bf2e657c54
commit 451a1631ea
3 changed files with 65 additions and 17 deletions

View File

@@ -12,7 +12,11 @@ DefVar $ProductId$
DefVar $MinimumSpace$
DefVar $InstallDir$
DefVar $ExitCode$
DefVar $INST_SystemType$
DefVar $INST_architecture$
Set $INST_SystemType$ = GetSystemType
Set $INST_architecture$ = GetProductProperty("install_architecture","system specific")
Set $LogDir$ = "%SystemDrive%\tmp"
; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh
@@ -51,22 +55,51 @@ else
endif
Message "Installing " + $ProductId$ + " ..."
comment "Copy files"
Files_install /32Bit
if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system specific") or ($INST_architecture$ = "both") or ($INST_architecture$ = "64 only"))
Files_install_64
Winbatch_install_64
Sub_check_exitcode
Files_Delete_64
endif
if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only")
Files_install_32
Winbatch_install_32
Sub_check_exitcode
Files_Delete_32
endif
; comment "Copy files"
; Files_install /32Bit
comment "Patch Registry"
Registry_install /32Bit
; comment "Patch Registry"
; Registry_install /32Bit
DosInAnIcon_Create
; DosInAnIcon_Create
comment "Reboot"
ExitWindows /Reboot
; comment "Reboot"
; ExitWindows /Reboot
endif
[Files_install]
copy -s "$Drv_Dir$32\*.*" "$InstallDir$\opsi_projects_drivers"
[Files_install_32]
copy -s "$Drv_Dir32$*.*" "$LogDir$\X86"
[Files_install_64]
copy -s "$Drv_Dir64$*.*" "$LogDir$\X64"
[Winbatch_install_32]
$LogDir$\X86\DPInst.exe /S
[Winbatch_install_64]
$LogDir$\X64\DPInst.exe /S
[Files_Delete_32]
delete -sf $LogDir$\X86
[Files_Delete_64]
delete -sf $LogDir$\X64
[Registry_install]
; Example of setting some values of an registry key:
@@ -78,3 +111,14 @@ set "DevicePath" = "%SystemRoot%\inf;$InstallDir$\opsi_projects_drivers"
rundll32 syssetup,SetupInfObjectInstallAction DefaultInstall 128 $InstallDir$\opsi_projects_drivers\brpom10a.inf
rundll32 syssetup,SetupInfObjectInstallAction DefaultInstall 128 $InstallDir$\opsi_projects_drivers\brimm10a.inf
rundll32 syssetup,SetupInfObjectInstallAction DefaultInstall 128 $InstallDir$\opsi_projects_drivers\BRPRM10A.INF
[Sub_check_exitcode]
comment "Test for installation success via exit code"
set $ExitCode$ = getLastExitCode
if ($ExitCode$ = "0") or ($ExitCode$ = "768")
comment "Looks good: setup program gives exitcode zero"
else
comment "Setup program gives a exitcode unequal zero: "+ $ExitCode$
isFatalError
endif