Add check exitcode scripts from opsi wiki for a better logline in the opsi logs

This commit is contained in:
Mario Fetka 2019-10-17 09:53:30 +02:00
parent 90844b3760
commit d2e7a4d3a2
10 changed files with 616 additions and 0 deletions

View File

@ -0,0 +1,53 @@
;Request ExitCode from last Program
set $ExitCode$ = getLastExitCode
;Modify Loglevel
setLogLevel = 4
;Check ExitCode
if ($ExitCode$ = "0")
setLogLevel = 5
comment "ExitCode = "+$ExitCode$+" Setup was successfully run to completion."
setLogLevel = 4
endif
if ($ExitCode$ = "1")
setLogLevel = 5
logError "ExitCode = "+$ExitCode$+" Setup failed to initialize."
isFatalError
endif
if ($ExitCode$ = "2")
setLogLevel = 5
logError "ExitCode = "+$ExitCode$+" The user clicked Cancel in the wizard before the actual installation started, or chose "No" on the opening "This will install..." message box."
isFatalError
endif
if ($ExitCode$ = "3")
setLogLevel = 5
logError "ExitCode = "+$ExitCode$+" A fatal error occurred while preparing to move to the next installation phase (for example, from displaying the pre-installation wizard pages to the actual installation process). This should never happen except under the most unusual of circumstances, such as running out of memory or Windows resources."
isFatalError
endif
if ($ExitCode$ = "4")
setLogLevel = 5
logError "ExitCode = "+$ExitCode$+" A fatal error occurred during the actual installation process."
isFatalError
endif
if ($ExitCode$ = "5")
setLogLevel = 5
logError "ExitCode = "+$ExitCode$+" The user clicked Cancel during the actual installation process, or chose Abort at an Abort-Retry-Ignore box."
isFatalError
endif
if ($ExitCode$ = "6")
setLogLevel = 5
logError "ExitCode = "+$ExitCode$+" The Setup process was forcefully terminated by the debugger (Run | Terminate was used in the IDE)."
isFatalError
endif
;Modify Loglevel
setLogLevel = 6

View File

@ -0,0 +1,92 @@
;Request Exitcode of last Program
set $ExitCode$ = getLastExitCode
;Modify Loglevel
setLogLevel = 4
;Check ExitCode
if ($ExitCode$ = "0")
setLogLevel = 5
comment "ExitCode = "+$ExitCode$+" Success"
setLogLevel = 4
endif
if ($ExitCode$ = "-1")
logError "ExitCode = "+$ExitCode$+" General error"
isFatalError
endif
if ($ExitCode$ = "-2")
logError "ExitCode = "+$ExitCode$+" Invalid mode"
isFatalError
endif
if ($ExitCode$ = "-3")
logError "ExitCode = "+$ExitCode$+" Required data not found in the Setup.iss file"
isFatalError
endif
if ($ExitCode$ = "-4")
logError "ExitCode = "+$ExitCode$+" Not enough memory available"
isFatalError
endif
if ($ExitCode$ = "-5")
logError "ExitCode = "+$ExitCode$+" File does not exist"
isFatalError
endif
if ($ExitCode$ = "-6")
logError "ExitCode = "+$ExitCode$+" Cannot write to the response file"
isFatalError
endif
if ($ExitCode$ = "-7")
logError "ExitCode = "+$ExitCode$+" Unable to write to the log file"
isFatalError
endif
if ($ExitCode$ = "-8")
logError "ExitCode = "+$ExitCode$+" Invalid path to the InstallShield Silent response file"
isFatalError
endif
if ($ExitCode$ = "-9")
logError "ExitCode = "+$ExitCode$+" Not a valid list type (string or number)"
isFatalError
endif
if ($ExitCode$ = "-10")
logError "ExitCode = "+$ExitCode$+" Data type is invalid"
isFatalError
endif
if ($ExitCode$ = "-11")
logError "ExitCode = "+$ExitCode$+" Unknown error during setup"
isFatalError
endif
if ($ExitCode$ = "-12")
logError "ExitCode = "+$ExitCode$+" Dialogs are out of order"
isFatalError
endif
if ($ExitCode$ = "-51")
logError "ExitCode = "+$ExitCode$+" Cannot create the specified folder"
isFatalError
endif
if ($ExitCode$ = "-52")
logError "ExitCode = "+$ExitCode$+" Cannot access the specified file or folder"
isFatalError
endif
if ($ExitCode$ = "-53")
logError "ExitCode = "+$ExitCode$+" Invalid option selected"
isFatalError
endif
;Modify Loglevel
setLogLevel = 6

View File

@ -0,0 +1,307 @@
;Request ExitCode from last Program
set $ExitCode$ = getLastExitCode
;Modify Loglevel
setLogLevel = 4
;Check ExitCode
if ($ExitCode$ = "0" OR $ExitCode$ ="1641" OR $ExitCode$ ="3010")
if ($ExitCode$ = "0")
setLogLevel = 5
comment "ExitCode = "+$ExitCode$+" Action completed successfully."
setLogLevel = 4
endif
if ($ExitCode$ = "1641")
setLogLevel = 5
comment "ExitCode = "+$ExitCode$+" ERROR_SUCCESS_REBOOT_INITIATED The installer has started a reboot. This error code not available on Windows Installer version 1.0."
setLogLevel = 4
endif
if ($ExitCode$ = "3010")
setLogLevel = 5
comment "ExitCode = "+$ExitCode$+" ERROR_SUCCESS_REBOOT_REQUIRED A reboot is required to complete the install. This does not include installs where the ForceReboot action is run. This error code not available on Windows Installer version 1.0."
setLogLevel = 4
endif
else
if ($ExitCode$ = "13")
setLogLevel = 5
logError "ExitCode = "+$ExitCode$+" ERROR_INVALID_DATA The data is invalid."
isFatalError
endif
if ($ExitCode$ = "87")
setLogLevel = 5
logError "ExitCode = "+$ExitCode$+" ERROR_INVALID_PARAMETER One of the parameters was invalid."
isFatalError
endif
if ($ExitCode$ = "120")
setLogLevel = 5
logError "ExitCode = "+$ExitCode$+" ERROR_CALL_NOT_IMPLEMENTED This function is not available for this platform. It is only available on Windows 2000 and Windows XP with Window Installer version 2.0."
isFatalError
endif
if ($ExitCode$ = "1259")
setLogLevel = 5
logError "ExitCode = "+$ExitCode$+" ERROR_APPHELP_BLOCK This error code only occurs when using Windows Installer version 2.0 and Windows XP or later. If Windows Installer determines a product may be incompatible with the current operating system, it displays a dialog informing the user and asking whether to try to install anyway. This error code is returned if the user chooses not to try the installation."
isFatalError
endif
if ($ExitCode$ = "1601")
setLogLevel = 5
logError "ExitCode = "+$ExitCode$+" ERROR_INSTALL_SERVICE_FAILURE The Windows Installer service could not be accessed. Contact your support personnel to verify that the Windows Installer service is properly registered."
isFatalError
endif
if ($ExitCode$ = "1602")
setLogLevel = 5
logError "ExitCode = "+$ExitCode$+" ERROR_INSTALL_USEREXIT User cancel installation."
isFatalError
endif
if ($ExitCode$ = "1603")
setLogLevel = 5
logError "ExitCode = "+$ExitCode$+" ERROR_INSTALL_FAILURE Fatal error during installation."
isFatalError
endif
if ($ExitCode$ = "1604")
setLogLevel = 5
logError "ExitCode = "+$ExitCode$+" ERROR_INSTALL_SUSPEND Installation suspended, incomplete."
isFatalError
endif
if ($ExitCode$ = "1605")
setLogLevel = 5
logError "ExitCode = "+$ExitCode$+" ERROR_UNKNOWN_PRODUCT This action is only valid for products that are currently installed."
isFatalError
endif
if ($ExitCode$ = "1606")
setLogLevel = 5
logError "ExitCode = "+$ExitCode$+" ERROR_UNKNOWN_FEATURE Feature ID not registered."
isFatalError
endif
if ($ExitCode$ = "1607")
setLogLevel = 5
logError "ExitCode = "+$ExitCode$+" ERROR_UNKNOWN_COMPONENT Component ID not registered."
isFatalError
endif
if ($ExitCode$ = "1608")
setLogLevel = 5
logError "ExitCode = "+$ExitCode$+" ERROR_UNKNOWN_PROPERTY Unknown property."
isFatalError
endif
if ($ExitCode$ = "1609")
setLogLevel = 5
logError "ExitCode = "+$ExitCode$+" ERROR_INVALID_HANDLE_STATE Handle is in an invalid state."
isFatalError
endif
if ($ExitCode$ = "1610")
setLogLevel = 5
logError "ExitCode = "+$ExitCode$+" ERROR_BAD_CONFIGURATION The configuration data for this product is corrupt. Contact your support personnel."
isFatalError
endif
if ($ExitCode$ = "1611")
setLogLevel = 5
logError "ExitCode = "+$ExitCode$+" ERROR_INDEX_ABSENT Component qualifier not present."
isFatalError
endif
if ($ExitCode$ = "1612")
setLogLevel = 5
logError "ExitCode = "+$ExitCode$+" ERROR_INSTALL_SOURCE_ABSENT The installation source for this product is not available. Verify that the source exists and that you can access it."
isFatalError
endif
if ($ExitCode$ = "1613")
setLogLevel = 5
logError "ExitCode = "+$ExitCode$+" ERROR_INSTALL_PACKAGE_VERSION This installation package cannot be installed by the Windows Installer service. You must install a Windows service pack that contains a newer version of the Windows Installer service."
isFatalError
endif
if ($ExitCode$ = "1614")
setLogLevel = 5
logError "ExitCode = "+$ExitCode$+" ERROR_PRODUCT_UNINSTALLED Product is uninstalled."
isFatalError
endif
if ($ExitCode$ = "1615")
setLogLevel = 5
logError "ExitCode = "+$ExitCode$+" ERROR_BAD_QUERY_SYNTAX SQL query syntax invalid or unsupported."
isFatalError
endif
if ($ExitCode$ = "1616")
setLogLevel = 5
logError "ExitCode = "+$ExitCode$+" ERROR_INVALID_FIELD Record field does not exist."
isFatalError
endif
if ($ExitCode$ = "1618")
setLogLevel = 5
logError "ExitCode = "+$ExitCode$+" ERROR_INSTALL_ALREADY_RUNNING Another installation is already in progress. Complete that installation before proceeding with this install."
isFatalError
endif
if ($ExitCode$ = "1619")
setLogLevel = 5
logError "ExitCode = "+$ExitCode$+" ERROR_INSTALL_PACKAGE_OPEN_FAILED This installation package could not be opened. Verify that the package exists and that you can access it, or contact the application vendor to verify that this is a valid Windows Installer package."
isFatalError
endif
if ($ExitCode$ = "1620")
setLogLevel = 5
logError "ExitCode = "+$ExitCode$+" ERROR_INSTALL_PACKAGE_INVALID This installation package could not be opened. Contact the application vendor to verify that this is a valid Windows Installer package."
isFatalError
endif
if ($ExitCode$ = "1621")
setLogLevel = 5
logError "ExitCode = "+$ExitCode$+" ERROR_INSTALL_UI_FAILURE There was an error starting the Windows Installer service user interface. Contact your support personnel."
isFatalError
endif
if ($ExitCode$ = "1622")
setLogLevel = 5
logError "ExitCode = "+$ExitCode$+" ERROR_INSTALL_LOG_FAILURE Error opening installation log file. Verify that the specified log file location exists and is writable."
isFatalError
endif
if ($ExitCode$ = "1623")
setLogLevel = 5
logError "ExitCode = "+$ExitCode$+" ERROR_INSTALL_LANGUAGE_UNSUPPORTED This language of this installation package is not supported by your system."
isFatalError
endif
if ($ExitCode$ = "1624")
setLogLevel = 5
logError "ExitCode = "+$ExitCode$+" ERROR_INSTALL_TRANSFORM_FAILURE Error applying transforms. Verify that the specified transform paths are valid."
isFatalError
endif
if ($ExitCode$ = "1625")
setLogLevel = 5
logError "ExitCode = "+$ExitCode$+" ERROR_INSTALL_PACKAGE_REJECTED This installation is forbidden by system policy. Contact your system administrator."
isFatalError
endif
if ($ExitCode$ = "1626")
setLogLevel = 5
logError "ExitCode = "+$ExitCode$+" ERROR_FUNCTION_NOT_CALLED Function could not be executed."
isFatalError
endif
if ($ExitCode$ = "1627")
setLogLevel = 5
logError "ExitCode = "+$ExitCode$+" ERROR_FUNCTION_FAILED Function failed during execution."
isFatalError
endif
if ($ExitCode$ = "1628")
setLogLevel = 5
logError "ExitCode = "+$ExitCode$+" ERROR_INVALID_TABLE Invalid or unknown table specified."
isFatalError
endif
if ($ExitCode$ = "1629")
setLogLevel = 5
logError "ExitCode = "+$ExitCode$+" ERROR_DATATYPE_MISMATCH Data supplied is of wrong type."
isFatalError
endif
if ($ExitCode$ = "1630")
setLogLevel = 5
logError "ExitCode = "+$ExitCode$+" ERROR_UNSUPPORTED_TYPE Data of this type is not supported."
isFatalError
endif
if ($ExitCode$ = "1631")
setLogLevel = 5
logError "ExitCode = "+$ExitCode$+" ERROR_CREATE_FAILED The Windows Installer service failed to start. Contact your support personnel."
isFatalError
endif
if ($ExitCode$ = "1632")
setLogLevel = 5
logError "ExitCode = "+$ExitCode$+" ERROR_INSTALL_TEMP_UNWRITABLE The temp folder is either full or inaccessible. Verify that the temp folder exists and that you can write to it."
isFatalError
endif
if ($ExitCode$ = "1633")
setLogLevel = 5
logError "ExitCode = "+$ExitCode$+" ERROR_INSTALL_PLATFORM_UNSUPPORTED This installation package is not supported on this platform. Contact your application vendor."
isFatalError
endif
if ($ExitCode$ = "1634")
setLogLevel = 5
logError "ExitCode = "+$ExitCode$+" ERROR_INSTALL_NOTUSED Component not used on this machine"
isFatalError
endif
if ($ExitCode$ = "1635")
setLogLevel = 5
logError "ExitCode = "+$ExitCode$+" ERROR_PATCH_PACKAGE_OPEN_FAILED This patch package could not be opened. Verify that the patch package exists and that you can access it, or contact the application vendor to verify that this is a valid Windows Installer patch package."
isFatalError
endif
if ($ExitCode$ = "1636")
setLogLevel = 5
logError "ExitCode = "+$ExitCode$+" ERROR_PATCH_PACKAGE_INVALID This patch package could not be opened. Contact the application vendor to verify that this is a valid Windows Installer patch package."
isFatalError
endif
if ($ExitCode$ = "1637")
setLogLevel = 5
logError "ExitCode = "+$ExitCode$+" ERROR_PATCH_PACKAGE_UNSUPPORTED This patch package cannot be processed by the Windows Installer service. You must install a Windows service pack that contains a newer version of the Windows Installer service."
isFatalError
endif
if ($ExitCode$ = "1638")
setLogLevel = 5
logError "ExitCode = "+$ExitCode$+" ERROR_PRODUCT_VERSION Another version of this product is already installed. Installation of this version cannot continue. To configure or remove the existing version of this product, use Add/Remove Programs on the Control Panel."
isFatalError
endif
if ($ExitCode$ = "1639")
setLogLevel = 5
logError "ExitCode = "+$ExitCode$+" ERROR_INVALID_COMMAND_LINE Invalid command line argument. Consult the Windows Installer SDK for detailed command line help."
isFatalError
endif
if ($ExitCode$ = "1640")
setLogLevel = 5
logError "ExitCode = "+$ExitCode$+" ERROR_INSTALL_REMOTE_DISALLOWED Installation from a Terminal Server client session not permitted for current user."
isFatalError
endif
if ($ExitCode$ = "1642")
setLogLevel = 5
logError "ExitCode = "+$ExitCode$+" ERROR_PATCH_TARGET_NOT_FOUND The installer cannot install the upgrade patch because the program being upgraded may be missing or the upgrade patch updates a different version of the program. Verify that the program to be upgraded exists on your computer and that you have the correct upgrade patch. This error code is not available on Windows Installer version 1.0."
isFatalError
endif
if ($ExitCode$ = "1643")
setLogLevel = 5
logError "ExitCode = "+$ExitCode$+" ERROR_PATCH_PACKAGE_REJECTED The patch package is not permitted by system policy. This error code is available with Windows Installer versions 2.0 or later."
isFatalError
endif
if ($ExitCode$ = "1644")
setLogLevel = 5
logError "ExitCode = "+$ExitCode$+" ERROR_INSTALL_TRANSFORM_REJECTED One or more customizations are not permitted by system policy. This error code is available with Windows Installer versions 2.0 or later."
isFatalError
endif
endif
;Modify Loglevel
setLogLevel = 6

View File

@ -0,0 +1,29 @@
;Request ExitCode from last Program
set $ExitCode$ = getLastExitCode
;Modify Loglevel
setLogLevel = 4
;Check ExitCode
if ($ExitCode$ = "0")
setLogLevel = 5
comment "ExitCode = "+$ExitCode$+" Normal execution (no error)"
setLogLevel = 4
endif
if ($ExitCode$ = "1")
setLogLevel = 5
logError "ExitCode = "+$ExitCode$+" Installation aborted by user (cancel button)"
isFatalError
endif
if ($ExitCode$ = "2")
setLogLevel = 5
logError "ExitCode = "+$ExitCode$+" Installation aborted by script"
isFatalError
endif
;Modify Loglevel
setLogLevel = 6

View File

@ -23,6 +23,10 @@ if FileExists($IniFile$)
if FileExists($UninstallProgramOld$)
comment "Uninstall program found, starting uninstall"
Winbatch_uninstall_old
;Sub "%ScriptPath%\check_innosetup-exitcode.opsiscript"
;Sub "%ScriptPath%\check_installshield-exitcode.opsiscript"
;Sub "%ScriptPath%\check_nullsoft-exitcode.opsiscript"
;Sub "%ScriptPath%\check_msi-exitcode.opsiscript"
sub_check_exitcode
;set $Reboot$="1"
endif
@ -30,6 +34,10 @@ endif
if FileExists($UninstallProgram$)
comment "Uninstall program found, starting uninstall"
Winbatch_uninstall
;Sub "%ScriptPath%\check_innosetup-exitcode.opsiscript"
;Sub "%ScriptPath%\check_installshield-exitcode.opsiscript"
;Sub "%ScriptPath%\check_nullsoft-exitcode.opsiscript"
;Sub "%ScriptPath%\check_msi-exitcode.opsiscript"
sub_check_exitcode
;set $Reboot$="1"
endif
@ -39,6 +47,10 @@ if FileExists($IniFile$)
if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiIdOld$ + "] DisplayName") = "")
comment "Old MSI id " + $MsiIdOld$ + " found in registry, starting msiexec to uninstall old version"
Winbatch_uninstall_msi_old
;Sub "%ScriptPath%\check_innosetup-exitcode.opsiscript"
;Sub "%ScriptPath%\check_installshield-exitcode.opsiscript"
;Sub "%ScriptPath%\check_nullsoft-exitcode.opsiscript"
;Sub "%ScriptPath%\check_msi-exitcode.opsiscript"
sub_check_exitcode
;set $Reboot$="1"
endif
@ -46,6 +58,10 @@ endif
if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId$ + "] DisplayName") = "")
comment "MSI id " + $MsiId$ + " found in registry, starting msiexec to uninstall"
Winbatch_uninstall_msi
;Sub "%ScriptPath%\check_innosetup-exitcode.opsiscript"
;Sub "%ScriptPath%\check_installshield-exitcode.opsiscript"
;Sub "%ScriptPath%\check_nullsoft-exitcode.opsiscript"
;Sub "%ScriptPath%\check_msi-exitcode.opsiscript"
sub_check_exitcode
;set $Reboot$="1"
endif

View File

@ -27,12 +27,20 @@ if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specif
if FileExists($UninstallProgramOld32$)
comment "Uninstall program found, starting uninstall"
Winbatch_uninstall_old_32
;Sub "%ScriptPath%\check_innosetup-exitcode.opsiscript"
;Sub "%ScriptPath%\check_installshield-exitcode.opsiscript"
;Sub "%ScriptPath%\check_nullsoft-exitcode.opsiscript"
;Sub "%ScriptPath%\check_msi-exitcode.opsiscript"
sub_check_exitcode
endif
endif
if FileExists($UninstallProgram32$)
comment "Uninstall program found, starting uninstall"
Winbatch_uninstall_32
;Sub "%ScriptPath%\check_innosetup-exitcode.opsiscript"
;Sub "%ScriptPath%\check_installshield-exitcode.opsiscript"
;Sub "%ScriptPath%\check_nullsoft-exitcode.opsiscript"
;Sub "%ScriptPath%\check_msi-exitcode.opsiscript"
sub_check_exitcode
endif
@ -41,12 +49,20 @@ if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specif
if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiIdOld32$ + "] DisplayName") = "")
comment "Old MSI id " + $MsiIdOld32$ + " found in registry, starting msiexec to uninstall old version"
Winbatch_uninstall_msi_old_32
;Sub "%ScriptPath%\check_innosetup-exitcode.opsiscript"
;Sub "%ScriptPath%\check_installshield-exitcode.opsiscript"
;Sub "%ScriptPath%\check_nullsoft-exitcode.opsiscript"
;Sub "%ScriptPath%\check_msi-exitcode.opsiscript"
sub_check_exitcode
endif
endif
if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId32$ + "] DisplayName") = "")
comment "MSI id " + $MsiId32$ + " found in registry, starting msiexec to uninstall"
Winbatch_uninstall_msi_32
;Sub "%ScriptPath%\check_innosetup-exitcode.opsiscript"
;Sub "%ScriptPath%\check_installshield-exitcode.opsiscript"
;Sub "%ScriptPath%\check_nullsoft-exitcode.opsiscript"
;Sub "%ScriptPath%\check_msi-exitcode.opsiscript"
sub_check_exitcode
endif
@ -76,12 +92,20 @@ if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system spe
if FileExists($UninstallProgramOld64$)
comment "Uninstall program found, starting uninstall"
Winbatch_uninstall_old_64
;Sub "%ScriptPath%\check_innosetup-exitcode.opsiscript"
;Sub "%ScriptPath%\check_installshield-exitcode.opsiscript"
;Sub "%ScriptPath%\check_nullsoft-exitcode.opsiscript"
;Sub "%ScriptPath%\check_msi-exitcode.opsiscript"
sub_check_exitcode
endif
endif
if FileExists($UninstallProgram64$)
comment "Uninstall program found, starting uninstall"
Winbatch_uninstall_64
;Sub "%ScriptPath%\check_innosetup-exitcode.opsiscript"
;Sub "%ScriptPath%\check_installshield-exitcode.opsiscript"
;Sub "%ScriptPath%\check_nullsoft-exitcode.opsiscript"
;Sub "%ScriptPath%\check_msi-exitcode.opsiscript"
sub_check_exitcode
endif
@ -90,12 +114,20 @@ if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system spe
if not (GetRegistryStringValue64("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiIdOld64$ + "] DisplayName") = "")
comment "Old MSI id " + $MsiIdOld64$ + " found in registry, starting msiexec to uninstall old version"
Winbatch_uninstall_msi_old_64
;Sub "%ScriptPath%\check_innosetup-exitcode.opsiscript"
;Sub "%ScriptPath%\check_installshield-exitcode.opsiscript"
;Sub "%ScriptPath%\check_nullsoft-exitcode.opsiscript"
;Sub "%ScriptPath%\check_msi-exitcode.opsiscript"
sub_check_exitcode
endif
endif
if not (GetRegistryStringValue64("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId64$ + "] DisplayName") = "")
comment "MSI id " + $MsiId64$ + " found in registry, starting msiexec to uninstall"
Winbatch_uninstall_msi_64
;Sub "%ScriptPath%\check_innosetup-exitcode.opsiscript"
;Sub "%ScriptPath%\check_installshield-exitcode.opsiscript"
;Sub "%ScriptPath%\check_nullsoft-exitcode.opsiscript"
;Sub "%ScriptPath%\check_msi-exitcode.opsiscript"
sub_check_exitcode
endif

View File

@ -23,12 +23,20 @@ if FileExists($IniFile$)
if FileExists($UninstallProgramOld$)
comment "Uninstall program found, starting uninstall"
Winbatch_uninstall_old
;Sub "%ScriptPath%\check_innosetup-exitcode.opsiscript"
;Sub "%ScriptPath%\check_installshield-exitcode.opsiscript"
;Sub "%ScriptPath%\check_nullsoft-exitcode.opsiscript"
;Sub "%ScriptPath%\check_msi-exitcode.opsiscript"
sub_check_exitcode
endif
endif
if FileExists($UninstallProgram$)
comment "Uninstall program found, starting uninstall"
Winbatch_uninstall
;Sub "%ScriptPath%\check_innosetup-exitcode.opsiscript"
;Sub "%ScriptPath%\check_installshield-exitcode.opsiscript"
;Sub "%ScriptPath%\check_nullsoft-exitcode.opsiscript"
;Sub "%ScriptPath%\check_msi-exitcode.opsiscript"
sub_check_exitcode
endif
@ -37,12 +45,20 @@ if FileExists($IniFile$)
if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiIdOld$ + "] DisplayName") = "")
comment "Old MSI id " + $MsiIdOld$ + " found in registry, starting msiexec to uninstall old version"
Winbatch_uninstall_msi_old
;Sub "%ScriptPath%\check_innosetup-exitcode.opsiscript"
;Sub "%ScriptPath%\check_installshield-exitcode.opsiscript"
;Sub "%ScriptPath%\check_nullsoft-exitcode.opsiscript"
;Sub "%ScriptPath%\check_msi-exitcode.opsiscript"
sub_check_exitcode
endif
endif
if not (GetRegistryStringValue64("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId$ + "] DisplayName") = "")
comment "MSI id " + $MsiId$ + " found in registry, starting msiexec to uninstall"
Winbatch_uninstall_msi
;Sub "%ScriptPath%\check_innosetup-exitcode.opsiscript"
;Sub "%ScriptPath%\check_installshield-exitcode.opsiscript"
;Sub "%ScriptPath%\check_nullsoft-exitcode.opsiscript"
;Sub "%ScriptPath%\check_msi-exitcode.opsiscript"
sub_check_exitcode
endif

View File

@ -99,6 +99,10 @@ else
comment "Start setup program"
ChangeDirectory "%SCRIPTPATH%"
Winbatch_install
;Sub "%ScriptPath%\check_innosetup-exitcode.opsiscript"
;Sub "%ScriptPath%\check_installshield-exitcode.opsiscript"
;Sub "%ScriptPath%\check_nullsoft-exitcode.opsiscript"
;Sub "%ScriptPath%\check_msi-exitcode.opsiscript"
Sub_check_exitcode
comment "Copy files"
@ -107,6 +111,9 @@ else
;comment "Kill Web Browser"
;ExecWith_BrowserKill %System%\cscript.exe //b //nologo
comment "Disable Update check"
DosInAnIcon_DisableUpdate
comment "Patch Registry"
Registry_install /32Bit
@ -210,6 +217,18 @@ delete_element "$NAME$"
;
; SFTA Applications\SumatraPDF.exe .pdf
[DosInAnIcon_DisbaleUpdate]
; Requires horstmuc.inifile
;
; inifile "$InstallDir$\custom.ini" [Updater] AutoUpdate=0
; Requires sourceforge.xmlstarlet
;
; Update value of an attribute
; xml ed -u "/xml/table/rec[@id=3]/@id" -v 5 "$InstallDir$\config.xml"> "$InstallDir$\config.model.xml"
; Update value of an element
; xml ed -u "/xml/table/rec[@id=1]/numField" -v 0 "$InstallDir$\config.xml"> "$InstallDir$\config.model.xml"
[Sub_get_licensekey]
if opsiLicenseManagementEnabled
comment "License management is enabled and will be used"

View File

@ -112,9 +112,15 @@ else
comment "Start setup program"
ChangeDirectory "%SCRIPTPATH%"
Winbatch_install_32
;Sub "%ScriptPath%\check_innosetup-exitcode.opsiscript"
;Sub "%ScriptPath%\check_installshield-exitcode.opsiscript"
;Sub "%ScriptPath%\check_nullsoft-exitcode.opsiscript"
;Sub "%ScriptPath%\check_msi-exitcode.opsiscript"
Sub_check_exitcode
;comment "Kill Web Browser"
;ExecWith_BrowserKill %System%\cscript.exe //b //nologo
comment "Disable Update check"
DosInAnIcon_DisableUpdate_32
comment "Copy files"
Files_install_32 /32Bit
comment "Patch Registry"
@ -130,9 +136,15 @@ else
comment "Start setup program"
ChangeDirectory "%SCRIPTPATH%"
Winbatch_install_64
;Sub "%ScriptPath%\check_innosetup-exitcode.opsiscript"
;Sub "%ScriptPath%\check_installshield-exitcode.opsiscript"
;Sub "%ScriptPath%\check_nullsoft-exitcode.opsiscript"
;Sub "%ScriptPath%\check_msi-exitcode.opsiscript"
Sub_check_exitcode
;comment "Kill Web Browser"
;ExecWith_BrowserKill %System%\cscript.exe //b //nologo
comment "Disable Update check"
DosInAnIcon_DisableUpdate_64
comment "Copy files"
Files_install_64 /64Bit
comment "Patch Registry"
@ -180,6 +192,18 @@ copy "$IniCfgFile$" "$InstallDir32$"
;
; copy -s "%ScriptPath%\files\*.*" "$InstallDir32$"
[DosInAnIcon_DisbaleUpdate_32]
; Requires horstmuc.inifile
;
; inifile "$InstallDir32$\custom.ini" [Updater] AutoUpdate=0
; Requires sourceforge.xmlstarlet
;
; Update value of an attribute
; xml ed -u "/xml/table/rec[@id=3]/@id" -v 5 "$InstallDir32$\config.xml"> "$InstallDir32$\config.model.xml"
; Update value of an element
; xml ed -u "/xml/table/rec[@id=1]/numField" -v 0 "$InstallDir32$\config.xml"> "$InstallDir32$\config.model.xml"
[Winbatch_install_64]
; Choose one of the following examples as basis for your installation
; You can use $LicenseKey$ var to pass a license key to the installer
@ -215,6 +239,18 @@ copy "$IniCfgFile$" "$InstallDir64$"
;
; copy -s "%ScriptPath%\files\*.*" "$InstallDir64$"
[DosInAnIcon_DisbaleUpdate_64]
; Requires horstmuc.inifile
;
; inifile "$InstallDir64$\custom.ini" [Updater] AutoUpdate=0
; Requires sourceforge.xmlstarlet
;
; Update value of an attribute
; xml ed -u "/xml/table/rec[@id=3]/@id" -v 5 "$InstallDir64$\config.xml"> "$InstallDir64$\config.model.xml"
; Update value of an element
; xml ed -u "/xml/table/rec[@id=1]/numField" -v 0 "$InstallDir64$\config.xml"> "$InstallDir64$\config.model.xml"
[Registry_install]
; Example of setting some values of an registry key:
;

View File

@ -99,6 +99,10 @@ else
comment "Start setup program"
ChangeDirectory "%SCRIPTPATH%"
Winbatch_install
;Sub "%ScriptPath%\check_innosetup-exitcode.opsiscript"
;Sub "%ScriptPath%\check_installshield-exitcode.opsiscript"
;Sub "%ScriptPath%\check_nullsoft-exitcode.opsiscript"
;Sub "%ScriptPath%\check_msi-exitcode.opsiscript"
Sub_check_exitcode
;comment "Kill Web Browser"
@ -210,6 +214,18 @@ delete_element "$NAME$"
;
; SFTA Applications\SumatraPDF.exe .pdf
[DosInAnIcon_DisbaleUpdate]
; Requires horstmuc.inifile
;
; inifile "$InstallDir$\custom.ini" [Updater] AutoUpdate=0
; Requires sourceforge.xmlstarlet
;
; Update value of an attribute
; xml ed -u "/xml/table/rec[@id=3]/@id" -v 5 "$InstallDir$\config.xml"> "$InstallDir$\config.model.xml"
; Update value of an element
; xml ed -u "/xml/table/rec[@id=1]/numField" -v 0 "$InstallDir$\config.xml"> "$InstallDir$\config.model.xml"
[Sub_get_licensekey]
if opsiLicenseManagementEnabled
comment "License management is enabled and will be used"