This shows you the differences between two versions of the page.
userspace:tightvnc [2012/10/22 12:10] tobias |
userspace:tightvnc [2021/08/23 08:37] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | == TightVNC with the new MSI installer == | ||
- | Since TightVNC 2.5.2 the developer changed to an MSI Installation. | ||
- | If you want you can install only the Viwer or only the Server. | ||
- | I created a Winst script with some Productproperties to modify the installer. | ||
- | I think it's beta, so some Properties may not work correctly. For example the product property to install the Server in non Service Mode. | ||
- | But you can set the Server Password and you can install only the viewer or only the Server. | ||
- | |||
- | For more Information about the new MSI Installer please read this PDF: [[http:// | ||
- | |||
- | |||
- | |||
- | ====== TightVNC Ver. 2.5.2 ====== | ||
- | |||
- | |||
- | Tested with opsi 4.11.2.9 \\ | ||
- | requiredWinstVersion >= Not Tested | ||
- | Files can be downloaded at http:// | ||
- | |||
- | By --- // | ||
- | |||
- | Tree:\\ | ||
- | < | ||
- | CLIENT_DATA | ||
- | --------- delsub3264.ins | ||
- | --------- setup3264.ins | ||
- | --------- tightVNC.png | ||
- | --------- uninstall3264.ins | ||
- | --------- vncX86.msi | ||
- | --------- vncX64.msi | ||
- | OPSI | ||
- | --------- control | ||
- | </ | ||
- | |||
- | ==== Steps ==== | ||
- | - Download TightVNC (x64, x86) | ||
- | |||
- | |||
- | ==== setup.ins ==== | ||
- | <code winst> | ||
- | [Actions] | ||
- | requiredWinstVersion >= " | ||
- | |||
- | DefVar $MsiId32$ | ||
- | DefVar $UninstallProgram32$ | ||
- | DefVar $MsiId64$ | ||
- | DefVar $UninstallProgram64$ | ||
- | DefVar $LogDir$ | ||
- | DefVar $ProductId$ | ||
- | DefVar $MinimumSpace$ | ||
- | DefVar $InstallDir32$ | ||
- | DefVar $InstallDir64$ | ||
- | DefVar $ExitCode$ | ||
- | DefVar $LicenseRequired$ | ||
- | DefVar $LicenseKey$ | ||
- | DefVar $LicensePool$ | ||
- | DefVar $INST_SystemType$ | ||
- | DefVar $INST_architecture$ | ||
- | |||
- | Set $INST_SystemType$ = GetSystemType | ||
- | set $INST_architecture$ = GetProductProperty(" | ||
- | |||
- | |||
- | 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 $InstallDir32$ | ||
- | Set $InstallDir64$ | ||
- | Set $LicenseRequired$ = " | ||
- | Set $LicensePool$ | ||
- | ; ---------------------------------------------------------------- | ||
- | |||
- | 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 | ||
- | |||
- | comment " | ||
- | |||
- | if (($INST_SystemType$ = "x86 System" | ||
- | Message " | ||
- | sub_generate_setupcommand | ||
- | comment "Start setup program" | ||
- | Winbatch_install_32 | ||
- | Sub_check_exitcode | ||
- | |||
- | endif | ||
- | |||
- | if ($INST_SystemType$ = "64 Bit System" | ||
- | Message " | ||
- | sub_generate_setupcommand | ||
- | comment "Start setup program" | ||
- | Winbatch_install_64 | ||
- | Sub_check_exitcode | ||
- | |||
- | endif | ||
- | |||
- | endif | ||
- | |||
- | [Winbatch_install_32] | ||
- | |||
- | ; === MSI package ======================================================================================= | ||
- | msiexec /i %scriptpath%\vncX86.msi /passive /norestart $setupMSI$ | ||
- | |||
- | |||
- | |||
- | [Winbatch_install_64] | ||
- | ; === MSI package ======================================================================================= | ||
- | msiexec /i %scriptpath%\vncX64.msi /passive /norestart $setupMSI$ | ||
- | |||
- | |||
- | [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 | ||
- | |||
- | |||
- | ; | ||
- | ; Generating the Setup command | ||
- | ; | ||
- | [sub_generate_setupcommand] | ||
- | ; Define String and Variables | ||
- | DefStringList $parameter$ | ||
- | ;Stringlist for MSI Parameter | ||
- | DefVar $usepassword$ | ||
- | ; | ||
- | DefVar $password$ | ||
- | ;The VNC Connection Password | ||
- | DefVar $setupMSI$ | ||
- | ;The full MSI Setup command | ||
- | DefVar $ownParameter$ | ||
- | ;Variable for define own commands via productproperty | ||
- | |||
- | ; Default Options | ||
- | DefVar $Mode$ | ||
- | DefVar $ADDLOCAL$ | ||
- | DefVar $VIEWER_ASSOCIATE_VNC_EXTENSION$ | ||
- | DefVar $SERVER_REGISTER_AS_SERVICE$ | ||
- | DefVar $SERVER_ADD_FIREWALL_EXCEPTION$ | ||
- | DefVar $VIEWER_ADD_FIREWALL_EXCEPTION$ | ||
- | DefVar $SERVER_ALLOW_SAS$ | ||
- | |||
- | |||
- | set $Mode$ = GetproductProperty(" | ||
- | set $parameter$= addtolist($parameter$,' | ||
- | |||
- | |||
- | ;Viewer Parameter | ||
- | |||
- | if ($Mode$ = " | ||
- | sub_set_ViewerOptions | ||
- | else | ||
- | if ($Mode$ = " | ||
- | sub_set_ServerOptions | ||
- | else | ||
- | if ($Mode$ = " | ||
- | sub_set_ServerOptions | ||
- | sub_set_ViewerOptions | ||
- | else | ||
- | isFatalError | ||
- | comment "You must set the correct ProductProperty" | ||
- | endif | ||
- | endif | ||
- | endif | ||
- | |||
- | |||
- | ;create setup command | ||
- | for %s% in $parameter$ do set $setupMSI$ = $setupMSI$+" | ||
- | comment $setupMSI$ | ||
- | |||
- | |||
- | [sub_set_ViewerOptions] | ||
- | set $VIEWER_ASSOCIATE_VNC_EXTENSION$ = GetproductProperty(" | ||
- | set $VIEWER_ADD_FIREWALL_EXCEPTION$ = GetproductProperty(" | ||
- | set $parameter$= addtolist($parameter$," | ||
- | set $parameter$= addtolist($parameter$," | ||
- | |||
- | |||
- | [sub_set_ServerOptions] | ||
- | set $SERVER_REGISTER_AS_SERVICE$ = GetproductProperty(" | ||
- | set $SERVER_ADD_FIREWALL_EXCEPTION$ = GetproductProperty(" | ||
- | set $SERVER_ALLOW_SAS$ = GetproductProperty(" | ||
- | set $password$ = " | ||
- | |||
- | |||
- | set $parameter$= addtolist($parameter$," | ||
- | |||
- | |||
- | |||
- | if ($SERVER_REGISTER_AS_SERVICE$ = " | ||
- | set $parameter$= addtolist($parameter$," | ||
- | set $parameter$= addtolist($parameter$," | ||
- | |||
- | if ($usepassword$ = " | ||
- | set $parameter$= addtolist($parameter$," | ||
- | set $parameter$= addtolist($parameter$," | ||
- | set $parameter$= addtolist($parameter$," | ||
- | set $parameter$= addtolist($parameter$, | ||
- | else | ||
- | comment ="No Password set" | ||
- | endif | ||
- | |||
- | else | ||
- | comment = " | ||
- | endif | ||
- | |||
- | |||
- | |||
- | |||
- | ;------- End ------------------------------------------------------------------- | ||
- | ; | ||
- | |||
- | |||
- | |||
- | </ | ||
- | |||
- | ==== uninstall.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 $MsiId32$ | ||
- | DefVar $UninstallProgram32$ | ||
- | DefVar $MsiId64$ | ||
- | DefVar $UninstallProgram64$ | ||
- | DefVar $LogDir$ | ||
- | DefVar $ExitCode$ | ||
- | DefVar $ProductId$ | ||
- | DefVar $InstallDir32$ | ||
- | DefVar $InstallDir64$ | ||
- | DefVar $LicenseRequired$ | ||
- | DefVar $LicensePool$ | ||
- | DefVar $INST_SystemType$ | ||
- | DefVar $INST_architecture$ | ||
- | |||
- | Set $INST_SystemType$ = GetSystemType | ||
- | set $INST_architecture$ = GetProductProperty(" | ||
- | |||
- | |||
- | Set $LogDir$ = " | ||
- | |||
- | ; ---------------------------------------------------------------- | ||
- | ; - Please edit the following values | ||
- | ; ---------------------------------------------------------------- | ||
- | Set $ProductId$ | ||
- | Set $InstallDir32$ | ||
- | Set $InstallDir64$ | ||
- | Set $LicenseRequired$ = " | ||
- | Set $LicensePool$ | ||
- | ; ---------------------------------------------------------------- | ||
- | |||
- | |||
- | 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("", | ||
- | |||
- | ==== delsub.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:// | ||
- | |||
- | |||
- | Set $MsiId32$ = ' | ||
- | Set $UninstallProgram32$ = $InstallDir32$ + " | ||
- | |||
- | Set $MsiId64$ = ' | ||
- | Set $UninstallProgram64$ = $InstallDir64$ + " | ||
- | |||
- | if (($INST_SystemType$ = "x86 System" | ||
- | Message " | ||
- | |||
- | if FileExists($UninstallProgram32$) | ||
- | comment " | ||
- | Winbatch_uninstall_32 | ||
- | sub_check_exitcode | ||
- | endif | ||
- | |||
- | if not (GetRegistryStringValue32(" | ||
- | comment "MSI id " + $MsiId32$ + " found in registry, starting msiexec to uninstall" | ||
- | Winbatch_uninstall_msi_32 | ||
- | sub_check_exitcode | ||
- | endif | ||
- | |||
- | comment " | ||
- | Files_uninstall_32 /32Bit | ||
- | comment " | ||
- | Registry_uninstall /32Bit | ||
- | endif | ||
- | |||
- | if ($INST_SystemType$ = "64 Bit System" | ||
- | Message " | ||
- | |||
- | if FileExists($UninstallProgram64$) | ||
- | comment " | ||
- | Winbatch_uninstall_64 | ||
- | sub_check_exitcode | ||
- | endif | ||
- | |||
- | if not (GetRegistryStringValue64(" | ||
- | comment "MSI id " + $MsiId64$ + " found in registry, starting msiexec to uninstall" | ||
- | Winbatch_uninstall_msi_64 | ||
- | sub_check_exitcode | ||
- | endif | ||
- | |||
- | comment " | ||
- | Files_uninstall_64 /64Bit | ||
- | comment " | ||
- | Registry_uninstall /64Bit | ||
- | endif | ||
- | |||
- | comment " | ||
- | LinkFolder_uninstall | ||
- | |||
- | [Winbatch_uninstall_32] | ||
- | ; Choose one of the following examples as basis for program uninstall | ||
- | ; | ||
- | ; === Nullsoft Scriptable Install System ================================================================ | ||
- | ; " | ||
- | ; | ||
- | ; === Inno Setup ======================================================================================== | ||
- | ; " | ||
- | |||
- | |||
- | [Winbatch_uninstall_msi_32] | ||
- | msiexec /x $MsiId32$ /qb! REBOOT=ReallySuppress | ||
- | |||
- | [Files_uninstall_32] | ||
- | ; Example for recursively deleting the installation directory (don't forget the trailing backslash): | ||
- | ; | ||
- | ; delete -sf " | ||
- | |||
- | [Winbatch_uninstall_64] | ||
- | ; Choose one of the following examples as basis for program uninstall | ||
- | ; | ||
- | ; === Nullsoft Scriptable Install System ================================================================ | ||
- | ; " | ||
- | ; | ||
- | ; === Inno Setup ======================================================================================== | ||
- | ; " | ||
- | |||
- | |||
- | [Winbatch_uninstall_msi_64] | ||
- | msiexec /x $MsiId64$ /qb! REBOOT=ReallySuppress | ||
- | |||
- | [Files_uninstall_64] | ||
- | ; Example for recursively deleting the installation directory (don't forget the trailing backslash): | ||
- | ; | ||
- | ; delete -sf " | ||
- | |||
- | [Registry_uninstall] | ||
- | ; Example of deleting a registry key: | ||
- | ; | ||
- | ; deletekey [HKEY_LOCAL_MACHINE\Software\$ProductId$] | ||
- | |||
- | [LinkFolder_uninstall] | ||
- | ; Example of deleting a folder from AllUsers startmenu: | ||
- | ; | ||
- | ; set_basefolder common_programs | ||
- | ; delete_subfolder $ProductId$ | ||
- | ; | ||
- | ; Example of deleting a shortcut from AllUsers desktop: | ||
- | ; | ||
- | ; set_basefolder common_desktopdirectory | ||
- | ; set_subfolder "" | ||
- | ; delete_element $ProductId$ | ||
- | |||
- | [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</ | ||
- | |||
- | |||
- | |||
- | |||
- | < | ||
- | [Package] | ||
- | version: 1 | ||
- | depends: | ||
- | incremental: | ||
- | |||
- | [Product] | ||
- | type: localboot | ||
- | id: tightvnc | ||
- | name: TightVNC | ||
- | description: | ||
- | advice: Kostenfrei | ||
- | version: 2.5.2 | ||
- | priority: 0 | ||
- | licenseRequired: | ||
- | productClasses: | ||
- | setupScript: | ||
- | uninstallScript: | ||
- | updateScript: | ||
- | alwaysScript: | ||
- | onceScript: | ||
- | customScript: | ||
- | userLoginScript: | ||
- | |||
- | [ProductProperty] | ||
- | type: unicode | ||
- | name: mode | ||
- | multivalue: False | ||
- | editable: False | ||
- | description: | ||
- | values: [" | ||
- | default: [" | ||
- | |||
- | [ProductProperty] | ||
- | type: unicode | ||
- | name: viewer_associate_vnc_extension | ||
- | multivalue: False | ||
- | editable: False | ||
- | description: | ||
- | values: [" | ||
- | default: [" | ||
- | |||
- | [ProductProperty] | ||
- | type: unicode | ||
- | name: viewer_add_firewall_exception | ||
- | multivalue: False | ||
- | editable: True | ||
- | description: | ||
- | values: [" | ||
- | default: [" | ||
- | |||
- | [ProductProperty] | ||
- | type: unicode | ||
- | name: server_register_as_service | ||
- | multivalue: False | ||
- | editable: False | ||
- | description: | ||
- | values: [" | ||
- | default: [" | ||
- | |||
- | [ProductProperty] | ||
- | type: unicode | ||
- | name: server_add_firewall_exception | ||
- | multivalue: False | ||
- | editable: False | ||
- | description: | ||
- | values: [" | ||
- | default: [" | ||
- | |||
- | [ProductProperty] | ||
- | type: unicode | ||
- | name: server_allow_sas | ||
- | multivalue: False | ||
- | editable: False | ||
- | values: [" | ||
- | default: [" | ||
- | |||
- | [ProductProperty] | ||
- | type: unicode | ||
- | name: usepassword | ||
- | multivalue: False | ||
- | editable: False | ||
- | description: | ||
- | values: [" | ||
- | default: [" | ||
- | |||
- | [ProductProperty] | ||
- | type: unicode | ||
- | name: passwort | ||
- | multivalue: False | ||
- | editable: True | ||
- | description: | ||
- | values: [" | ||
- | default: [" | ||
- | |||
- | [Changelog] | ||
- | tightvnc (2.5.2-1) testing; urgency=low | ||
- | |||
- | * Initial package | ||
- | |||
- | |||
- | </ | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | ====== Old Version with EXE installer ====== | ||
- | |||
- | Tested with opsi 4.0.1 \\ | ||
- | requiredWinstVersion >= 4.10.8.6 \\ | ||
- | For 32 Bit \\ | ||
- | Installation files at http:// | ||
- | |||
- | Send questions to // | ||
- | |||
- | Tree: | ||
- | < | ||
- | TightVNC.jpg | ||
- | TightVNC.reg | ||
- | Tightvnc_win7.reg | ||
- | delsub.ins | ||
- | setup.ins | ||
- | tightvnc_*version*-setup.exe | ||
- | uninstall.ins | ||
- | </ | ||
- | |||
- | __Hint__: The reg-files set predefined options for the whole network. Install TightVNC on a test-system, | ||
- | Save the following trees to the defined reg-files listed in the tree. | ||
- | |||
- | **Windows XP:** HKLM\Software\TightVNC\Server \\ | ||
- | **Win7 | ||
- | |||
- | ==== setup.ins ==== | ||
- | <code winst> | ||
- | [Initial] | ||
- | LogLevel=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 >= " | ||
- | |||
- | DefVar $UninstallProgram32$ | ||
- | DefVar $UninstallProgram64$ | ||
- | 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_Cmd32$ | ||
- | DefVar $Inst_Cmd64$ | ||
- | DefVar $Inst_Prg$ | ||
- | DefVar $Uninst_Prg$ | ||
- | |||
- | Set $INST_SystemType$ = GetSystemType | ||
- | set $INST_architecture$ = GetProductProperty(" | ||
- | |||
- | |||
- | Set $LogDir$ = " | ||
- | |||
- | ; ---------------------------------------------------------------- | ||
- | ; - Please edit the following values | ||
- | ; ---------------------------------------------------------------- | ||
- | ; | ||
- | ; therefore please: only lower letters, no umlauts, | ||
- | ; no white space use ' | ||
- | Set $ProductId$ | ||
- | Set $Version$ | ||
- | Set $MinimumSpace$ | ||
- | ; the path were we find the product after the installation | ||
- | Set $InstallDir32$ | ||
- | Set $LicenseRequired$ = " | ||
- | Set $LicensePool$ | ||
- | Set $Inst_Prg$ | ||
- | Set $Uninst_Prg$ | ||
- | Set $Inst_Cmd32$ | ||
- | ; ---------------------------------------------------------------- | ||
- | |||
- | 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 | ||
- | |||
- | if $LicenseRequired$ = " | ||
- | comment " | ||
- | Sub_get_licensekey | ||
- | endif | ||
- | |||
- | comment " | ||
- | |||
- | if (($INST_SystemType$ = "x86 System" | ||
- | Message " | ||
- | comment "Start setup program" | ||
- | Winbatch_install_32 | ||
- | Sub_check_exitcode | ||
- | endif | ||
- | |||
- | if ($INST_SystemType$ = "64 Bit System" | ||
- | Message " | ||
- | comment "Start setup program" | ||
- | Winbatch_install_64 | ||
- | Sub_check_exitcode | ||
- | endif | ||
- | |||
- | endif | ||
- | |||
- | [Winbatch_install_32] | ||
- | %ScriptPath%\$Inst_Prg$ $Inst_Cmd32$ | ||
- | regedit /S " | ||
- | |||
- | [Winbatch_install_64] | ||
- | %ScriptPath%\$Inst_Prg$ $Inst_Cmd32$ | ||
- | regedit /S " | ||
- | |||
- | [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> | ||
- | [Initial] | ||
- | LogLevel=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 >= " | ||
- | |||
- | DefVar $UninstallProgram32$ | ||
- | DefVar $UninstallProgram64$ | ||
- | DefVar $LogDir$ | ||
- | DefVar $ExitCode$ | ||
- | DefVar $ProductId$ | ||
- | DefVar $InstallDir32$ | ||
- | DefVar $InstallDir64$ | ||
- | DefVar $LicenseRequired$ | ||
- | DefVar $LicensePool$ | ||
- | DefVar $INST_SystemType$ | ||
- | DefVar $INST_architecture$ | ||
- | DefVar $Inst_Cmd$ | ||
- | DefVar $Inst_Prg$ | ||
- | |||
- | Set $INST_SystemType$ = GetSystemType | ||
- | set $INST_architecture$ = GetProductProperty(" | ||
- | |||
- | |||
- | Set $LogDir$ = " | ||
- | |||
- | ; ---------------------------------------------------------------- | ||
- | ; - Please edit the following values | ||
- | ; ---------------------------------------------------------------- | ||
- | Set $ProductId$ | ||
- | Set $InstallDir32$ | ||
- | Set $LicenseRequired$ = " | ||
- | Set $LicensePool$ | ||
- | Set $Inst_Prg$ | ||
- | Set $Inst_Cmd$ | ||
- | ; ---------------------------------------------------------------- | ||
- | |||
- | 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("", | ||
- | |||
- | </ | ||
- | |||
- | ==== delsub.ins ==== | ||
- | <code winst> | ||
- | killtask " | ||
- | |||
- | if (($INST_SystemType$ = "x86 System" | ||
- | Message " | ||
- | |||
- | if FileExists($UninstallProgram32$) | ||
- | comment " | ||
- | Winbatch_uninstall_32 | ||
- | comment " | ||
- | Files_uninstall_32 | ||
- | sub_check_exitcode | ||
- | endif | ||
- | Mendif | ||
- | |||
- | if ($INST_SystemType$ = "64 Bit System" | ||
- | Message " | ||
- | |||
- | ; Achtung, nachfolgende Hinweise auf ...32 sind keine Fehler - TightVNC gibt es derzeit nur als 32-Bit-Variante! | ||
- | if FileExists($UninstallProgram32$) | ||
- | comment " | ||
- | Winbatch_uninstall_32 | ||
- | comment " | ||
- | Files_uninstall_32 | ||
- | sub_check_exitcode | ||
- | endif | ||
- | endif | ||
- | |||
- | [Winbatch_uninstall_32] | ||
- | " | ||
- | |||
- | [Files_uninstall_32] | ||
- | ; Example for recursively deleting the installation directory (don't forget the trailing backslash): | ||
- | ; | ||
- | delete -sf " | ||
- | |||
- | [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 | ||
- | |||
- | </ |