====== Adobe Reader DC ====== Adaptation of the opsi-template scripts for Adobe Reader. \\ Download Adobe Reader DC from here: http://get.adobe.com/reader/enterprise/ and rename it to AdobeReader.exe\\ This code will disable AdobeARM and the Adobe Reader DC Updater and it will delete the Sidebar of Adobe Reader DCs. \\ You have to check the MSI-id. If Adobe will get a new Version, it will change, so you have to edit the MSI-id in setup.ins and uninstall.ins. This code is for 15.009.20069 (German). Tree: |-- files | |--Viewer.aapp |-- AdobeReader.exe |-- adobereaderdc.png |-- setup.ins `-- uninstall.ins ==== control file ==== [Package] version: 10 depends: incremental: False [Product] type: localboot id: adobereaderdc name: Adobe Reader DC description: advice: version: 15.009.20069 priority: 0 licenseRequired: False productClasses: setupScript: setup.ins uninstallScript: uninstall.ins updateScript: alwaysScript: onceScript: customScript: userLoginScript: [Changelog] adobereaderdc (15.009.20069-10) testing; urgency=low; add MSIid as an variable -- fjelk Wed, 18.12.2015 11:07:00 +0000 adobereaderdc (15.009.20069-9) testing; urgency=low; add reg-key for disable update -- fjelk Wed, 20 Nov 2015 15:28:26 +0000 adobereaderdc (15.009.20069-8) testing; urgency=low; uninstall previous version -- fjelk Wed, 16 Nov 2015 15:28:26 +0000 adobereaderdc (15.009.20069-7) testing; urgency=low; uninstall previous version -- fjelk Wed, 04 Nov 2015 15:28:26 +0000 adobereaderdc (15.009.20069-5) testing; urgency=low; disable ARM * Initial package -- fjelk Wed, 04 Nov 2015 15:28:26 +0000 ==== setup.ins ==== [Actions] requiredWinstVersion >= "4.10.8.6" DefVar $LogDir$ DefVar $ProductId$ DefVar $MinimumSpace$ DefVar $InstallDir$ DefVar $Setupfile$ DefVar $ExitCode$ DefVar $INST_SystemType$ DefVar $INST_MsVersion$ DefVar $MSIid$ set $INST_MsVersion$ = GetMsVersionInfo Set $INST_SystemType$ = GetSystemType ;set $INST_architecture$ = GetProductProperty("install_architecture","system specific") Set $LogDir$ = "%SystemDrive%\tmp" ; ---------------------------------------------------------------- ; - Please edit the following values - ; ---------------------------------------------------------------- ;$ProductId$ should be the name of the product in opsi ; therefore please: only lower letters, no umlauts, ; no white space use '-' as a seperator Set $MSIid$ = "{AC76BA86-7AD7-1031-7B44-AC0F074E4100}" Set $ProductId$ = "adobereaderdc" Set $MinimumSpace$ = "500 MB" Set $Setupfile$ = "AdobeReader.exe" ; the path were we find the product after the installation Set $InstallDir$ = "%ProgramFiles32Dir%\Adobe\Acrobat Reader DC" ; ---------------------------------------------------------------- if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$)) LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed for " + $ProductId$ isFatalError ; Stop process and set installation status to failed endif if $INST_MsVersion$ < "6.1" LogError "Windows 7 or newer is required for " + $ProductId$ isFatalError endif comment "Show product picture" ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ if FileExists("%ProgramFiles32Dir%\Adobe\Acrobat Reader DC\Reader\AcroRd32.exe") comment "Start uninstall sub section" WinBatch_uninstall endif ;Text shown during installation Message "Installiert Adobe Reader DC" ;Sets the LogLevel ;Allowed LogLevels are: ;0 = nothing (absolute nothing) ;1 = essential ("essential information") ;2 = critical (unexpected errors that my cause a program abort) ;3 = error (Errors that don't will abort the running program) ;4 = warning (you should have a look at this) ;5 = notice (Important statements to the program flow) ;6 = info (Additional Infos) ;7 = debug (important debug messages) ;8 = debug2 (a lot more debug informations and data) ;9 = confidential (passwords and other security relevant data) SetLogLevel=6 WinBatch_Install DosBatch_DisableARM Registry_install Files_copy_local sub_check_exitcode [Files_copy_local] delete -f "$InstallDir$\Reader\AcroApp\DEU\Viewer.aapp" copy -s "%scriptpath%\files\Viewer.aapp" "$InstallDir$\Reader\AcroApp\DEU\." [Registry_install] openkey [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Adobe\Acrobat Reader\DC\FeatureLockDown] set "bUpdater" = reg_dword:0 [DosBatch_DisableARM] sc stop AdobeARMservice sc config AdobeARMservice start= disabled [WinBatch_Install] %scriptpath%\$Setupfile$ /sAll /rs /msi EULA_ACCEPT=YES [WinBatch_uninstall] MsiExec.exe /passive /x $MSIid$ [Sub_check_exitcode] comment "Test for installation success via exit code" set $ExitCode$ = getLastExitCode ; informations to exit codes see ; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx ; http://msdn.microsoft.com/en-us/library/aa368542.aspx if ($ExitCode$ = "0") comment "Looks good: setup program gives exitcode zero" else comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ if ($ExitCode$ = "1605") comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed." comment "Uninstall of a not installed product failed - no problem" else if ($ExitCode$ = "1641") comment "looks good: setup program gives exitcode 1641" comment "ERROR_SUCCESS_REBOOT_INITIATED 1641 The installer has initiated a restart. This message is indicative of a success." else if ($ExitCode$ = "3010") comment "looks good: setup program gives exitcode 3010" comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success." else logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$ isFatalError endif endif endif endif ==== uninstall.ins ==== [Actions] DefVar $MSIid$ Set $MSIid$ = "{AC76BA86-7AD7-1031-7B44-AC0F074E4100}" Message "Deinstalliere Adobe Reader DC" WinBatch_uninstall [WinBatch_uninstall] MsiExec.exe /passive /x $MSIid$ ==== Viewer.aapp ====