This shows you the differences between two versions of the page.
userspace:foxit_pdf_reader [2012/07/17 12:19] SisterOfMercy created |
userspace:foxit_pdf_reader [2021/08/23 08:37] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Foxit PDF Reader ====== | ||
- | Adaptation of the opsi-template scripts for Foxit PDF Reader. \\ | ||
- | The Foxit Reader is a small, fast, and feature rich PDF viewer which allows you to open, view, and print any PDF file.\\ | ||
- | We use the Enterprise version, but this script will probably also work with the normal version: http:// | ||
- | |||
- | The registry settings are for setting of the preferences. setup.ins and uninstall.ins have some double code, but I find it easier this way, seperate scripts for setup and uninstall.\\ | ||
- | |||
- | ==== control file ==== | ||
- | |||
- | <code winst> | ||
- | [Package] | ||
- | version: 2 | ||
- | depends: | ||
- | incremental: | ||
- | |||
- | [Product] | ||
- | type: localboot | ||
- | id: foxit-pdf-reader | ||
- | name: Foxit PDF Reader | ||
- | description: | ||
- | advice: | ||
- | version: 5.3.1.0606 | ||
- | priority: -50 | ||
- | licenseRequired: | ||
- | productClasses: | ||
- | setupScript: | ||
- | uninstallScript: | ||
- | updateScript: | ||
- | alwaysScript: | ||
- | onceScript: | ||
- | customScript: | ||
- | userLoginScript: | ||
- | |||
- | [Changelog] | ||
- | foxit-pdf-reader (5.3.1.0606-1) testing; urgency=low | ||
- | |||
- | * Initial package | ||
- | |||
- | -- ICT < | ||
- | </ | ||
- | |||
- | |||
- | ==== setup.ins ==== | ||
- | |||
- | <code winst> | ||
- | [Actions] | ||
- | requiredWinstVersion >= " | ||
- | |||
- | DefVar $MsiId$ | ||
- | DefVar $LogDir$ | ||
- | DefVar $ProductId$ | ||
- | DefVar $MinimumSpace$ | ||
- | DefVar $InstallDir$ | ||
- | DefVar $ExitCode$ | ||
- | |||
- | Set $LogDir$ = " | ||
- | |||
- | ; ---------------------------------------------------------------- | ||
- | Set $ProductId$ | ||
- | Set $MinimumSpace$ | ||
- | Set $MsiId$ | ||
- | Set $InstallDir$ | ||
- | ; ---------------------------------------------------------------- | ||
- | |||
- | if not(HasMinimumSpace (" | ||
- | LogError "Not enough space on %SystemDrive%, | ||
- | isFatalError | ||
- | ; Stop process and set installation status to failed | ||
- | else | ||
- | comment "Show product picture" | ||
- | ShowBitmap " | ||
- | |||
- | if not (GetRegistryStringValue32(" | ||
- | comment "MSI id " + $MsiId$ + " found in registry, starting uninstall" | ||
- | Winbatch_uninstall | ||
- | sub_check_exitcode | ||
- | endif | ||
- | |||
- | Message " | ||
- | |||
- | comment "Start setup program" | ||
- | Winbatch_install | ||
- | Sub_check_exitcode | ||
- | |||
- | comment "Patch Registry" | ||
- | Registry_install / | ||
- | |||
- | endif | ||
- | |||
- | [Winbatch_install] | ||
- | msiexec /qn /package " | ||
- | |||
- | [Registry_install] | ||
- | openkey [HKEY_CURRENT_USER\Software\Foxit Software\Foxit Reader 5.0\StartPage\Advertisement] | ||
- | set " | ||
- | |||
- | openkey [HKEY_CURRENT_USER\Software\Foxit Software\Foxit Reader 5.0\SpellCheck] | ||
- | set " | ||
- | |||
- | openkey [HKEY_CURRENT_USER\Software\Foxit Software\Foxit Reader 5.0\plugins\Updater] | ||
- | set " | ||
- | set " | ||
- | |||
- | openkey [HKEY_CURRENT_USER\Software\Foxit Software\Foxit Reader 5.0\Windows] | ||
- | set " | ||
- | |||
- | openkey [HKEY_CURRENT_USER\Software\Foxit Software\Foxit Reader 5.0\Windows\Toolbars\Toolbar\View] | ||
- | set " | ||
- | set " | ||
- | set " | ||
- | set " | ||
- | set " | ||
- | set " | ||
- | set " | ||
- | set " | ||
- | set " | ||
- | set " | ||
- | |||
- | [Winbatch_uninstall] | ||
- | msiexec /qn /uninstall $MsiId$ | ||
- | |||
- | [Sub_check_exitcode] | ||
- | comment "Test for installation success via exit code" | ||
- | set $ExitCode$ = getLastExitCode | ||
- | ; informations to exit codes see | ||
- | ; http:// | ||
- | ; http:// | ||
- | if ($ExitCode$ = " | ||
- | comment "Looks good: setup program gives exitcode zero" | ||
- | else | ||
- | comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ | ||
- | if ($ExitCode$ = " | ||
- | comment " | ||
- | comment " | ||
- | else | ||
- | if ($ExitCode$ = " | ||
- | comment "looks good: setup program gives exitcode 1641" | ||
- | comment " | ||
- | else | ||
- | if ($ExitCode$ = " | ||
- | comment "looks good: setup program gives exitcode 3010" | ||
- | comment " | ||
- | else | ||
- | logError " | ||
- | isFatalError | ||
- | endif | ||
- | endif | ||
- | endif | ||
- | endif | ||
- | </ | ||
- | |||
- | ==== uninstall.ins ==== | ||
- | |||
- | <code winst> | ||
- | [Actions] | ||
- | requiredWinstVersion >= " | ||
- | |||
- | DefVar $MsiId$ | ||
- | DefVar $LogDir$ | ||
- | DefVar $ProductId$ | ||
- | DefVar $InstallDir$ | ||
- | DefVar $ExitCode$ | ||
- | |||
- | Set $LogDir$ = " | ||
- | |||
- | ; ---------------------------------------------------------------- | ||
- | Set $ProductId$ | ||
- | Set $MsiId$ | ||
- | Set $InstallDir$ | ||
- | ; ---------------------------------------------------------------- | ||
- | |||
- | comment "Show product picture" | ||
- | ShowBitmap " | ||
- | |||
- | Message " | ||
- | |||
- | if not (GetRegistryStringValue32(" | ||
- | comment "MSI id " + $MsiId$ + " found in registry, starting uninstall" | ||
- | Winbatch_uninstall | ||
- | sub_check_exitcode | ||
- | endif | ||
- | |||
- | [Winbatch_uninstall] | ||
- | msiexec /qn /uninstall $MsiId$ | ||
- | |||
- | [Sub_check_exitcode] | ||
- | comment "Test for installation success via exit code" | ||
- | set $ExitCode$ = getLastExitCode | ||
- | ; informations to exit codes see | ||
- | ; http:// | ||
- | ; http:// | ||
- | if ($ExitCode$ = " | ||
- | comment "Looks good: setup program gives exitcode zero" | ||
- | else | ||
- | comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ | ||
- | if ($ExitCode$ = " | ||
- | comment " | ||
- | comment " | ||
- | else | ||
- | if ($ExitCode$ = " | ||
- | comment "looks good: setup program gives exitcode 1641" | ||
- | comment " | ||
- | else | ||
- | if ($ExitCode$ = " | ||
- | comment "looks good: setup program gives exitcode 3010" | ||
- | comment " | ||
- | else | ||
- | logError " | ||
- | isFatalError | ||
- | endif | ||
- | endif | ||
- | endif | ||
- | endif | ||
- | </ |