User Tools

Site Tools


userspace:pdf-xchange

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

userspace:pdf-xchange [2011/11/01 15:08]
jester Moved sub_check_exitcode up, otherwise it can generate exitcode: 1619 / LogLevel depricated => SetLogLevel / Some minor translation changes
userspace:pdf-xchange [2021/08/23 08:37]
Line 1: Line 1:
-====== PDF-XChange (Lite) for 32 and 64 Bit ====== 
  
-Tested with opsi 4.0.1\\ 
-requiredWinstVersion >= 4.10.8.6\\ 
-For 32 Bit and 64 Bit\\ 
-Installationfiles are available at: http://www.tracker-software.com/product/downloads 
- 
-By:  //[[hungerharke@gmx.de|Thomas_H]] 2011/10/28 09:13// 
- 
-**Tree:** 
-<code> 
-PDF-XChange (32 Bit).jpg 
-PXCViewer_x64.msi 
-PXCViewer_x86.msi 
-delsub.ins 
-setup.ins 
-uninstall.ins 
-</code> 
- 
-==== Steps ==== 
-  - Download the PDF-XChange Viewer, get the "MSI Network Installer (32 bit)" and the "MSI Network Installer (64 bit)". 
-  - Copy both files to the CLIENT_DATA-directory 
- 
-==== setup.ins ==== 
-<code winst> 
-[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 $MsiId32$ 
-DefVar $MsiId64$ 
-DefVar $LogDir$ 
-DefVar $ProductId$ 
-DefVar $MinimumSpace$ 
-DefVar $InstallDir32$ 
-DefVar $InstallDir64$ 
-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$ 
- 
-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$       = "PDF-XChange" 
-Set $Version$         = "2.5.197" 
-Set $MinimumSpace$    = "10 MB" 
-; the path were we find the product after the installation 
-Set $InstallDir32$      = "%ProgramFiles32Dir%\Tracker Software\PDF Viewer\" 
-Set $InstallDir64$      = "%ProgramFiles64Dir%\Tracker Software\PDF Viewer\" 
-Set $LicenseRequired$ = "false" 
-Set $LicensePool$     = "p_" + $ProductId$ 
-Set $Inst_Prg32$      = "PXCViewer_x86.msi" 
-Set $Inst_Prg64$      = "PXCViewer_x64.msi" 
-Set $Inst_Cmd$        = '/qr /passive /i' 
-Set $Uninst_Cmd$      = '/qr /passive /x' 
-; ---------------------------------------------------------------- 
- 
-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("%ScriptPath%\delsub.ins") 
-                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 "Installing "+$ProductID$+"..." 
- 
-        if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only") 
-                Message "Installing " + $ProductId$+" (32 Bit)" 
-                comment "Start setup program" 
-                comment "%System%\msiexec.exe /qr /passive /i %ScriptPath%\$Inst_Prg32$" 
-                Winbatch_install_32 
-                Sub_check_exitcode 
-        endif 
- 
-        if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system specific") or ($INST_architecture$ = "both") or ($INST_architecture$ = "64 only")) 
-                Message "Installing " + $ProductId$+" (64 Bit)" 
-                comment "Start setup program" 
-                comment "%System%\msiexec.exe /qr /passive /i %ScriptPath%\$Inst_Prg64$" 
-                Winbatch_install_64 
-                Sub_check_exitcode 
-        endif 
- 
-endif 
- 
-[Winbatch_install_32] 
-%System%\msiexec.exe $Inst_Cmd$ %ScriptPath%\$Inst_Prg32$ 
- 
-[Winbatch_install_64] 
-%System%\msiexec.exe $Inst_Cmd$ %ScriptPath%\$Inst_Prg64$ 
- 
- 
-[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 
- 
-</code> 
- 
-==== uninstall.ins ==== 
-<code winst> 
-[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 $MsiId32$ 
-DefVar $UninstallProgram32$ 
-DefVar $MsiId64$ 
-DefVar $LogDir$ 
-DefVar $ExitCode$ 
-DefVar $ProductId$ 
-DefVar $InstallDir32$ 
-DefVar $InstallDir64$ 
-DefVar $LicenseRequired$ 
-DefVar $LicensePool$ 
-DefVar $INST_SystemType$ 
-DefVar $INST_architecture$ 
-DefVar $Uninst_Cmd$ 
-DefVar $Inst_Prg32$ 
-DefVar $Inst_Prg64$ 
- 
-Set $INST_SystemType$ = GetSystemType 
-set $INST_architecture$ = GetProductProperty("install_architecture","system specific") 
- 
- 
-Set $LogDir$ = "%SystemDrive%\tmp" 
- 
-; ---------------------------------------------------------------- 
-; - Please edit the following values                             - 
-; ---------------------------------------------------------------- 
-Set $ProductId$         = "PDF-XChange (32 Bit)" 
-Set $InstallDir32$      = "%ProgramFiles32Dir%\Tracker Software\PDF Viewer\" 
-Set $LicenseRequired$   = "false" 
-Set $LicensePool$       = "p_" + $ProductId$ 
-Set $Inst_Prg32$          = "PXCViewer_x86.msi" 
-Set $Inst_Prg64$          = "PXCViewer_x64.msi" 
-Set $Uninst_Cmd$        = '/qr /passive /x' 
-; ---------------------------------------------------------------- 
- 
-comment "Show product picture" 
-ShowBitmap "%ScriptPath%\" + $ProductId$ + ".jpg" $ProductId$ 
- 
-Message "Uninstalling " + $ProductId$ + ". Please be patient..." 
-comment "Start uninstall sub section" 
-Sub "%ScriptPath%\delsub.ins" 
- 
-if $LicenseRequired$ = "true" 
-        comment "Licensing required, free license used" 
-        Sub_free_license 
-endif 
- 
-</code> 
- 
-==== delsub.ins ==== 
-<code winst> 
-if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only") 
-        Message "Uninstalling " + $ProductId$ + " 32 Bit..." 
-        Winbatch_uninstall_32 
-        sub_check_exitcode 
-        comment "Removing "+$InstallDir32$ 
-        Files_uninstall_32 
-Mendif 
- 
-if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system specific") or ($INST_architecture$ = "both") or ($INST_architecture$ = "64 only")) 
-        Message "Uninstalling " + $ProductId$ + " 64 Bit..." 
-        Winbatch_uninstall_64 
-        sub_check_exitcode 
-        comment "Removing "+$InstallDir64$ 
-        Files_uninstall_64 
-endif 
- 
- 
-[Winbatch_uninstall_32] 
-%System%\msiexec.exe $Uninst_Cmd$ %ScriptPath%\$Inst_Prg32$ 
- 
-[Winbatch_uninstall_64] 
-%System%\msiexec.exe $Uninst_Cmd$ %ScriptPath%\$Inst_Prg64$ 
- 
-[Files_uninstall_32] 
-delete -sf "$InstallDir32$\" 
- 
-[Files_uninstall_64] 
-delete -sf "$InstallDir64$\" 
- 
-[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 
-</code> 
userspace/pdf-xchange.txt ยท Last modified: 2021/08/23 08:37 (external edit)