This shows you the differences between two versions of the page.
userspace:endnote_x6 [2012/10/02 11:50] tobias |
userspace:endnote_x6 [2021/08/23 08:37] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | == Endnote X6 == | ||
- | This package installs Endnote X6 silent. | ||
- | Before starting the setup the script will check for running Office Programs. | ||
- | |||
- | The Script is based on the opsi-template from UIB. I included the [[userspace: | ||
- | |||
- | Tested with opsi 4.11.2.9 | ||
- | requiredWinstVersion >= 4.11.2.1 \\ | ||
- | By --- // | ||
- | |||
- | |||
- | setup32.ins | ||
- | <code winst> | ||
- | ; Copyright (c) uib gmbh (www.uib.de) | ||
- | ; This sourcecode is owned by uib | ||
- | ; and published under the Terms of the General Public License. | ||
- | ; credits: http:// | ||
- | |||
- | [Actions] | ||
- | ; ----------------------------------------------------------------- | ||
- | ; Check Task Vars | ||
- | ; | ||
- | setloglevel = 6 | ||
- | requiredWinstVersion >= " | ||
- | |||
- | DefVar $processVAR$ | ||
- | DefVar $currentchecktask$ | ||
- | DefVar $killtask$ | ||
- | DefVar $fatalerror$ | ||
- | DefVar $userfail$ | ||
- | DefVar $message$ | ||
- | |||
- | DefStringList $tasklist$ | ||
- | DefStringList $process$ | ||
- | DefStringList $SearchProcess$ | ||
- | ; Check Task Ende | ||
- | |||
- | DefVar $MsiId$ | ||
- | DefVar $UninstallProgram$ | ||
- | DefVar $LogDir$ | ||
- | DefVar $ProductId$ | ||
- | DefVar $MinimumSpace$ | ||
- | DefVar $InstallDir$ | ||
- | DefVar $ExitCode$ | ||
- | DefVar $LicenseRequired$ | ||
- | DefVar $LicenseKey$ | ||
- | DefVar $LicensePool$ | ||
- | DefVar $closetasks$ | ||
- | DefVar $closetasks2$ | ||
- | Set $LogDir$ = " | ||
- | |||
- | ; ---------------------------------------------------------------- | ||
- | ; - Please edit the following values | ||
- | ; ---------------------------------------------------------------- | ||
- | ; | ||
- | ; therefore please: only lower letters, no umlauts, | ||
- | ; no white space use ' | ||
- | Set $ProductId$ | ||
- | Set $MinimumSpace$ | ||
- | ; the path were we find the product after the installation | ||
- | Set $InstallDir$ | ||
- | Set $LicenseRequired$ = " | ||
- | Set $LicensePool$ | ||
- | |||
- | ;Checktask settings----------------------------------------------- | ||
- | set $searchProcess$ = createStringList (' | ||
- | ;Do you want to kill the running | ||
- | set $killtask$ = " | ||
- | ;Report a FATALERROR to opsiconfd | ||
- | set $fatalerror$ = " | ||
- | ; Show message before starting setup | ||
- | set $message$ = " | ||
- | ;Show Error Message | ||
- | set $userfail$ = "Es wurden laufende Programme gefunden, ich probiere es spaeter erneut !" | ||
- | ; ---------------------------------------------------------------- | ||
- | ; | ||
- | ; | ||
- | ; | ||
- | pause $message$ | ||
- | |||
- | for %s% in $SearchProcess$ do sub_checkfunktion | ||
- | |||
- | |||
- | |||
- | ; | ||
- | ; | ||
- | ; | ||
- | |||
- | 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 FileExists(" | ||
- | comment "Start uninstall sub section" | ||
- | Sub " | ||
- | endif | ||
- | |||
- | Message " | ||
- | |||
- | if $LicenseRequired$ = " | ||
- | comment " | ||
- | Sub_get_licensekey | ||
- | endif | ||
- | |||
- | comment "Start setup program" | ||
- | |||
- | Winbatch_install | ||
- | Sub_check_exitcode | ||
- | |||
- | comment "Copy files" | ||
- | Files_install /32Bit | ||
- | |||
- | comment "Patch Registry" | ||
- | Registry_install /32Bit | ||
- | |||
- | comment " | ||
- | LinkFolder_install | ||
- | |||
- | comment "Test for installation success" | ||
- | ; Test if software marked as installed in registry | ||
- | ; if (GetRegistryStringValue32(" | ||
- | ; logError " | ||
- | ; isFatalError | ||
- | ; else | ||
- | ; comment " | ||
- | ; endif | ||
- | |||
- | endif | ||
- | |||
- | ExitWindows / | ||
- | |||
- | [Winbatch_install] | ||
- | ; Choose one of the following examples as basis for your installation | ||
- | ; You can use $LicenseKey$ var to pass a license key to the installer | ||
- | ; | ||
- | ; === Nullsoft Scriptable Install System ================================================================ | ||
- | ; " | ||
- | ; | ||
- | ; === MSI package ======================================================================================= | ||
- | ; You may use the parameter PIDKEY=$Licensekey$ | ||
- | msiexec /passive /norestart /i " | ||
- | ; | ||
- | ; === InstallShield + MSI===================================================================================== | ||
- | ; Attention: The path to the log file should not contain any whitespaces | ||
- | ; " | ||
- | ; " | ||
- | ; | ||
- | ; === InstallShield ===================================================================================== | ||
- | ; Create setup.iss answer file by running: setup.exe /r / | ||
- | ; " | ||
- | ; | ||
- | ; === Inno Setup ======================================================================================== | ||
- | ; http:// | ||
- | ; You may create setup answer file by: setup.exe / | ||
- | ; You may use an answer file by the parameter / | ||
- | ; " | ||
- | |||
- | [Files_install] | ||
- | ; Example of recursively copying some files into the installation directory: | ||
- | ; | ||
- | ; copy -s " | ||
- | |||
- | [Registry_install] | ||
- | ; Example of setting some values of an registry key: | ||
- | ; | ||
- | ; openkey [HKEY_LOCAL_MACHINE\Software\$ProductId$] | ||
- | ; set " | ||
- | ; set " | ||
- | ; set " | ||
- | |||
- | [LinkFolder_install] | ||
- | ; Example of deleting a folder from AllUsers startmenu: | ||
- | ; | ||
- | ; set_basefolder common_programs | ||
- | ; delete_subfolder $ProductId$ | ||
- | ; | ||
- | ; Example of creating an shortcut to the installed exe in AllUsers startmenu: | ||
- | ; | ||
- | ; set_basefolder common_programs | ||
- | ; set_subfolder $ProductId$ | ||
- | ; | ||
- | ; set_link | ||
- | ; name: $ProductId$ | ||
- | ; target: <path to the program> | ||
- | ; parameters: | ||
- | ; working_dir: | ||
- | ; icon_file: | ||
- | ; icon_index: | ||
- | ; end_link | ||
- | ; | ||
- | ; Example of creating an shortcut to the installed exe on AllUsers desktop: | ||
- | ; | ||
- | ; set_basefolder common_desktopdirectory | ||
- | ; set_subfolder "" | ||
- | ; | ||
- | ; set_link | ||
- | ; name: $ProductId$ | ||
- | ; target: <path to the program> | ||
- | ; parameters: | ||
- | ; working_dir: | ||
- | ; icon_file: <path to icon file> | ||
- | ; icon_index: | ||
- | ; end_link | ||
- | |||
- | [Sub_get_licensekey] | ||
- | if opsiLicenseManagementEnabled | ||
- | comment " | ||
- | |||
- | comment " | ||
- | Set $LicenseKey$ = demandLicenseKey ($LicensePool$) | ||
- | ; If there is an assignment of exactly one licensepool to the product the following call is possible: | ||
- | ; Set $LicenseKey$ = demandLicenseKey ("", | ||
- | ; | ||
- | ; If there is an assignment of a license pool to a windows software id, it is possible to use: | ||
- | ; DefVar $WindowsSoftwareId$ | ||
- | ; $WindowsSoftwareId$ = " | ||
- | ; Set $LicenseKey$ = demandLicenseKey ("", | ||
- | |||
- | DefVar $ServiceErrorClass$ | ||
- | set $ServiceErrorClass$ = getLastServiceErrorClass | ||
- | comment "Error class: " + $ServiceErrorClass$ | ||
- | |||
- | if $ServiceErrorClass$ = " | ||
- | comment " | ||
- | else | ||
- | if $ServiceErrorClass$ = " | ||
- | LogError " | ||
- | LogError getLastServiceErrorMessage | ||
- | isFatalError | ||
- | else | ||
- | if $ServiceErrorClass$ = " | ||
- | LogError " | ||
- | isFatalError | ||
- | endif | ||
- | endif | ||
- | endif | ||
- | else | ||
- | LogError " | ||
- | isFatalError | ||
- | endif | ||
- | |||
- | |||
- | [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 | ||
- | |||
- | |||
- | ; | ||
- | [sub_checkfunktion] | ||
- | set $currentchecktask$ = " | ||
- | set $tasklist$ = getOutStreamFromSection(' | ||
- | ;set $process$ = splitString(takeString(1, | ||
- | set $processVAR$ = unquote(takeString(1, | ||
- | |||
- | if ($processVAR$ = $currentchecktask$) | ||
- | Message = " | ||
- | if ($killtask$ = " | ||
- | killtask $currentchecktask$ | ||
- | else | ||
- | message " | ||
- | |||
- | endif | ||
- | if ($fatalerror$ = " | ||
- | pause | ||
- | isFatalError | ||
- | |||
- | else | ||
- | message " | ||
- | endif | ||
- | |||
- | message | ||
- | endif | ||
- | |||
- | |||
- | [DosInAnIcon_checkprocess] | ||
- | @echo off | ||
- | TASKLIST /FI " | ||
- | </ | ||
- | |||
- | |||
- | uninstall32.ins | ||
- | <code winst> | ||
- | ; Copyright (c) uib gmbh (www.uib.de) | ||
- | ; This sourcecode is owned by uib gmbh | ||
- | ; and published under the Terms of the General Public License. | ||
- | ; credits: http:// | ||
- | |||
- | [Actions] | ||
- | requiredWinstVersion >= " | ||
- | |||
- | DefVar $MsiId$ | ||
- | DefVar $UninstallProgram$ | ||
- | DefVar $LogDir$ | ||
- | DefVar $ExitCode$ | ||
- | DefVar $ProductId$ | ||
- | DefVar $InstallDir$ | ||
- | DefVar $LicenseRequired$ | ||
- | DefVar $LicensePool$ | ||
- | DefVar $closetasks$ | ||
- | |||
- | Set $LogDir$ = " | ||
- | |||
- | ; ---------------------------------------------------------------- | ||
- | ; - Please edit the following values | ||
- | ; ---------------------------------------------------------------- | ||
- | Set $ProductId$ | ||
- | Set $InstallDir$ | ||
- | Set $LicenseRequired$ = " | ||
- | Set $LicensePool$ | ||
- | Set $closetasks$ = "Bitte beenden Sie ALLE Programme und bestätigen Sie anschliessend." | ||
- | ; ---------------------------------------------------------------- | ||
- | |||
- | |||
- | comment "Show product picture" | ||
- | ShowBitmap " | ||
- | |||
- | Message " | ||
- | |||
- | if FileExists(" | ||
- | comment "Start uninstall sub section" | ||
- | Sub " | ||
- | endif | ||
- | |||
- | if $LicenseRequired$ = " | ||
- | comment " | ||
- | Sub_free_license | ||
- | endif | ||
- | |||
- | [Sub_free_license] | ||
- | comment " | ||
- | |||
- | comment " | ||
- | DefVar $result$ | ||
- | Set $result$ = FreeLicense($LicensePool$) | ||
- | ; If there is an assignment of a license pool to the product, it is possible to use | ||
- | ; Set $result$ = FreeLicense("", | ||
- | ; | ||
- | ; If there is an assignment of a license pool to a windows software id, it is possible to use | ||
- | ; DefVar $WindowsSoftwareId$ | ||
- | ; $WindowsSoftwareId$ = " | ||
- | ; set $result$ = FreeLicense("", | ||
- | </ | ||
- | |||
- | |||
- | delsub32.ins | ||
- | <code winst> | ||
- | ; Copyright (c) uib gmbh (www.uib.de) | ||
- | ; This sourcecode is owned by uib gmbh | ||
- | ; and published under the Terms of the General Public License. | ||
- | ; credits: http:// | ||
- | |||
- | [Actions] | ||
- | requiredWinstVersion >= " | ||
- | |||
- | DefVar $MsiId$ | ||
- | DefVar $UninstallProgram$ | ||
- | DefVar $LogDir$ | ||
- | DefVar $ExitCode$ | ||
- | DefVar $ProductId$ | ||
- | DefVar $InstallDir$ | ||
- | DefVar $LicenseRequired$ | ||
- | DefVar $LicensePool$ | ||
- | DefVar $closetasks$ | ||
- | |||
- | Set $LogDir$ = " | ||
- | |||
- | ; ---------------------------------------------------------------- | ||
- | ; - Please edit the following values | ||
- | ; ---------------------------------------------------------------- | ||
- | Set $ProductId$ | ||
- | Set $InstallDir$ | ||
- | Set $LicenseRequired$ = " | ||
- | Set $LicensePool$ | ||
- | Set $closetasks$ = "Bitte beenden Sie ALLE Programme und bestätigen Sie anschliessend." | ||
- | ; ---------------------------------------------------------------- | ||
- | |||
- | |||
- | comment "Show product picture" | ||
- | ShowBitmap " | ||
- | |||
- | Message " | ||
- | |||
- | if FileExists(" | ||
- | comment "Start uninstall sub section" | ||
- | Sub " | ||
- | endif | ||
- | |||
- | if $LicenseRequired$ = " | ||
- | comment " | ||
- | Sub_free_license | ||
- | endif | ||
- | |||
- | [Sub_free_license] | ||
- | comment " | ||
- | |||
- | comment " | ||
- | DefVar $result$ | ||
- | Set $result$ = FreeLicense($LicensePool$) | ||
- | ; If there is an assignment of a license pool to the product, it is possible to use | ||
- | ; Set $result$ = FreeLicense("", | ||
- | ; | ||
- | ; If there is an assignment of a license pool to a windows software id, it is possible to use | ||
- | ; DefVar $WindowsSoftwareId$ | ||
- | ; $WindowsSoftwareId$ = " | ||
- | ; set $result$ = FreeLicense("", | ||
- | </ |