User Tools

Site Tools


userspace:gpg4win

This is an old revision of the document!


Tested with OPSI 4.0.4.0
Winst 4.11.3.11
Works fine with Win7 x86 and x64 and probable with Windows XP.
by — S. Taube 2014/09/01 16:00

Gpg4win 2.2.1

You need the Installer for Gpg4win 2.2.1.
And You can download it here: http://www.heise.de/download/gpg4win-1119466.html

Steps

  1. Download the Installer for Gpg4win 2.2.1
    and put it to the CLIENT_DATA-directory on your Workbench.
  2. Create a new file named gpg4win.ini and fill it up with the script provided down there
    if you want to install Gpg4win with your own Specials.
    and put this file in the CLIENT-DATA-Directory too.
  3. Create new textfiles in the CLIENT_DATA-directory and fill them up with the scripts provided down there.
    You might want to edit some lines in order to fit your needs.
  4. Ready the package and install it on your server.

thats it

setup.ins

<code winst> [Actions] [Initial] SetLogLevel=9 ; Log Errors in Logfile but don't abort: ExitOnError=false ; Show syntax errors in the script: ScriptErrorMessages=on ; Dont trace step by step through the script: TraceMode=off ; let started programs run in front of the winst window StayOnTop=false

[Actions] requiredWinstVersion >= “4.10.8.6”

DefVar $LogDir$ DefVar $ProductId$ DefVar $MinimumSpace$ DefVar $InstallDir32$ DefVar $InstallDir64$ DefVar $InstallDir32_Cmd$ DefVar $InstallDir64_Cmd$ DefVar $ExitCode$ DefVar $LicenseRequired$ DefVar $LicenseKey$ DefVar $LicensePool$ DefVar $INST_SystemType$ DefVar $INST_architecture$ DefVar $Version$ DefVar $Inst_Cmd$ DefVar $Inst_Prg32$ DefVar $Inst_Prg64$ DefVar $Uninst_Cmd$ DefVar $Uninst_Prg$

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 $ProductId$ = “Gpg4win” Set $Version$ = “2.2.1” Set $MinimumSpace$ = “50 MB” ; the path were we find the product after the installation Set $InstallDir32$ = “%ProgramFiles32Dir%\Gpg4win\” Set $InstallDir64$ = “%ProgramFiles64Dir%\Gpg4win\” Set $InstallDir32_Cmd$ = “/D=%ProgramFiles32Dir%\Gpg4win\” Set $InstallDir64_Cmd$ = “/D=%ProgramFiles64Dir%\Gpg4win\” Set $LicenseRequired$ = “false” Set $LicensePool$ = “p_” + $ProductId$ Set $Inst_Prg32$ = “gpg4win-2.2.1.exe” Set $Inst_Prg64$ = “gpg4win-2.2.1.exe” Set $Uninst_Prg$ = “gpg4win-uninstall.exe” Set $Inst_Cmd$ = '/S /C=%ScriptPath%\gpg4win.ini' Set $Uninst_Cmd$ = '/S' ; —————————————————————-

comment “Show product picture” ShowBitmap “%ScriptPath%\” + $ProductId$ + “.jpg” $ProductId$

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

else

if FileExists($InstallDir32$+$Uninst_Prg$) ; if FileExists(“%ProgramFiles32Dir%\Gpg4win\gpg4win-uninstall.exe”)

              comment "Start uninstall sub section"
              Sub "%ScriptPath%\delsub.ins"
      endif
      if FileExists($InstallDir64$+$Uninst_Prg$)

; if FileExists(“%ProgramFiles64Dir%\Gpg4win\gpg4win-uninstall.exe”)

              comment "Start uninstall sub section"
              Sub "%ScriptPath%\delsub.ins"
      endif

if $LicenseRequired$ = “true”

              comment "Licensing required, reserve license and get license key"
              Sub_get_licensekey
      endif

comment “Installiere ”+$ProductID$+“…”

if 1) or ($INST_architecture$ = “both”) or ($INST_architecture$ = “32 only”)

              Message "Installiere " + $ProductId$+" (32 Bit)"
              comment "Start setup program"
              Winbatch_install_32
              Sub_check_exitcode
      endif

if ($INST_SystemType$ = “64 Bit System”) and 2)

              Message "Installiere " + $ProductId$+" (64 Bit)"
              comment "Start setup program"
              Winbatch_install_64
              Sub_check_exitcode
      endif

endif

[Winbatch_install_32] net stop dirmngr %ScriptPath%\$Inst_Prg32$ $Inst_Cmd$ $InstallDir32_Cmd$

[Winbatch_install_64] net stop dirmngr %ScriptPath%\$Inst_Prg64$ $Inst_Cmd$ $InstallDir64_Cmd$

[Sub_check_exitcode] comment “Test for installation success via exit code” set $ExitCode$ = getLastExitCode 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

1)
$INST_SystemType$ = “x86 System”) and ($INST_architecture$ = “system specific”
2)
$INST_architecture$ = “system specific”) or ($INST_architecture$ = “both”) or ($INST_architecture$ = “64 only”
userspace/gpg4win.1409581184.txt.gz · Last modified: 2021/08/23 08:37 (external edit)