This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
winsttest [2011/09/21 14:08] ueluekmen removed |
— (current) | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | TEST | ||
| - | |||
| - | <code winst> | ||
| - | " | ||
| - | </ | ||
| - | |||
| - | <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] | ||
| - | requiredWinstVersion >= " | ||
| - | |||
| - | DefVar $MsiId$ | ||
| - | DefVar $UninstallProgram$ | ||
| - | DefVar $LogDir$ | ||
| - | DefVar $ProductId$ | ||
| - | DefVar $MinimumSpace$ | ||
| - | DefVar $InstallDir$ | ||
| - | DefVar $ExitCode$ | ||
| - | DefVar $LicenseRequired$ | ||
| - | DefVar $LicenseKey$ | ||
| - | DefVar $LicensePool$ | ||
| - | |||
| - | 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$ | ||
| - | ; ---------------------------------------------------------------- | ||
| - | |||
| - | 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(" | ||
| - | ; | ||
| - | ; | ||
| - | ; else | ||
| - | ; | ||
| - | ; endif | ||
| - | |||
| - | endif | ||
| - | |||
| - | [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 /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$ | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; end_link | ||
| - | ; | ||
| - | ; Example of creating an shortcut to the installed exe on AllUsers desktop: | ||
| - | ; | ||
| - | ; set_basefolder common_desktopdirectory | ||
| - | ; set_subfolder "" | ||
| - | ; | ||
| - | ; set_link | ||
| - | ; name: $ProductId$ | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; | ||
| - | ; 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 | ||
| - | </ | ||
| - | |||