From b4c64f120c62bc5181bded00753c058cec40a5cd Mon Sep 17 00:00:00 2001 From: Mario Fetka Date: Sat, 21 Sep 2013 10:40:00 +0200 Subject: [PATCH] use setup.exe with patching Abcpy.ini for silent install --- CLIENT_DATA/opsi-adobe.photoshopcs2.ini | 22 ----------------- CLIENT_DATA/setup32.ins | 33 ++++++++++++++++++++----- OPSI/control | 6 +++++ builder-product.cfg | 7 ++---- 4 files changed, 35 insertions(+), 33 deletions(-) diff --git a/CLIENT_DATA/opsi-adobe.photoshopcs2.ini b/CLIENT_DATA/opsi-adobe.photoshopcs2.ini index 01fe288..e69de29 100644 --- a/CLIENT_DATA/opsi-adobe.photoshopcs2.ini +++ b/CLIENT_DATA/opsi-adobe.photoshopcs2.ini @@ -1,22 +0,0 @@ -;*************************************************************** -;Adobe Installer External Configuration File: Abcpy.ini -;*************************************************************** - -;*************************************************************** -;Main Section -;The (Product) key is a required key -;*************************************************************** -[MAIN] -Product=Adobe(R) Photoshop CS2 -AbcpyVersion=2.0 - - -;*************************************************************** -;OEM Installation Options -;*************************************************************** -[OEM Install] -SERIALNUMBER= -SERIALNUMBERTRYOUT= -USERNAME= -COMPANYNAME= -INSTALLDIR= diff --git a/CLIENT_DATA/setup32.ins b/CLIENT_DATA/setup32.ins index 99cd7a1..5529685 100644 --- a/CLIENT_DATA/setup32.ins +++ b/CLIENT_DATA/setup32.ins @@ -27,7 +27,7 @@ DefVar $LanguageId$ set $LanguageId$ = getValue("default_language_id_decimal", $languageInfo$) DefStringList $ShortProgramFiles32List$ -$ShortProgramFiles32List$ = getOutStreamFromSection ('DosInAnIcon_path') +set $ShortProgramFiles32List$ = getOutStreamFromSection ('DosInAnIcon_path') DefVar $ShortProgramFiles32Dir$ set $ShortProgramFiles32Dir$ = takeString (-1, $ShortProgramFiles32List$) @@ -51,7 +51,7 @@ Set $LogDir$ = "%SystemDrive%\tmp" ; no white space use '-' as a seperator Set $MinimumSpace$ = "600 MB" ; the path were we find the product after the installation -Set $InstallDir$ = "%ShortProgramFiles32Dir%\Adobe\Adobe Photoshop CS2" +Set $InstallDir$ = $ShortProgramFiles32Dir$ + "\Adobe\Adobe Photoshop CS2" Set $LicenseRequired$ = "true" Set $LicensePool$ = "p_" + $ProductId$ ; ---------------------------------------------------------------- @@ -80,12 +80,22 @@ else comment "Start setup program" ChangeDirectory "%SCRIPTPATH%" + Files_delete + + Files_copy + Sub_check_exitcode + + DosInAnIcon_license + Sub_check_exitcode + Winbatch_install Sub_check_exitcode Winbatch_update Sub_check_exitcode + Files_delete + comment "Copy files" Files_install /32Bit @@ -98,22 +108,33 @@ else endif [DosInAnIcon_path] -"%ScriptPath%\short.bat $ProgramFiles32Dir$ +"%ScriptPath%\short.bat %ProgramFiles32Dir% + +[DosInAnIcon_license] +inifile $LogDir$\$ProductId$\Abcpy.ini [OEM Install] SERIALNUMBER="$Licensekey$" +inifile $LogDir$\$ProductId$\Abcpy.ini [OEM Install] USERNAME="%PCName%" +inifile $LogDir$\$ProductId$\Abcpy.ini [OEM Install] COMPANYNAME="%IPName%" +inifile $LogDir$\$ProductId$\Abcpy.ini [OEM Install] INSTALLDIR="$InstallDir$" [Winbatch_install] -msiexec /i "$Install90Msi$"" /l* "$LogDir$\$ProductId$.install_log.txt" /qb! EULA_ACCEPT=YES SERIALNUMBER="$Licensekey$" USERNAME="%PCName%" COMPANYNAME="%IPName%" INSTALLDIR="$InstallDir$" ALLUSERS=1 REBOOT=ReallySuppress -; "$Install90Msi$" /rs /sPB /l /sl "1031" /msi EULA_ACCEPT=YES SERIALNUMBER="$Licensekey$" USERNAME="%PCName%" COMPANYNAME="%IPName%" INSTALLDIR="$InstallDir$" ALLUSERS=1 +"$LogDir$\$ProductId$\setup.exe" /S /v /qn [Winbatch_update] "$Install902Exe$" /s +[Files_delete] +del -sf "$LogDir$\$ProductId$\" + +[Files_copy] +copy -s "%ScriptPath%\Core\*.*" "$LogDir$\$ProductId$\" + [Files_install] ; copy the ini file to the InstallDir copy "$IniCfgFile$" "$InstallDir$" ; Example of recursively copying some files into the installation directory: ; -; copy -s "%ScriptPath%\files\*.*" "$InstallDir$" +; copy -s "%ScriptPath%\files\*.*" "$InstallDir$\" [Registry_install] ; Example of setting some values of an registry key: diff --git a/OPSI/control b/OPSI/control index 09da3a0..027ea5a 100644 --- a/OPSI/control +++ b/OPSI/control @@ -27,4 +27,10 @@ requiredProduct: sereby.aio requiredStatus: installed requirementType: before +[ProductDependency] +action: setup +requiredProduct: horstmuc.inifile +requiredStatus: installed +requirementType: before + diff --git a/builder-product.cfg b/builder-product.cfg index 12232e5..1a0d84f 100644 --- a/builder-product.cfg +++ b/builder-product.cfg @@ -31,11 +31,8 @@ DL_EXTRACT_FORMAT[2]="7zip" # File array index for the image showing while installing the program ICON_DL_INDEX=0 -WINST_NAME[0]="Install90Msi" -WINST_VALUE[0]="@DL_EXTRACT_WINST_PATH[2]@\\Core\\Adobe Photoshop CS2.msi" - -WINST_NAME[1]="Install902Exe" -WINST_VALUE[1]="@DL_EXTRACT_WINST_PATH[2]@\\Updater\\setup.exe" +WINST_NAME[0]="Install902Exe" +WINST_VALUE[0]="@DL_EXTRACT_WINST_PATH[2]@\\Updater\\setup.exe" OPSI_INI_SECTION[0]="X86" OPSI_INI_OPTION[0]="MsiId"