What does Windows error code 1627 (ERROR_FUNCTION_FAILED) mean?

 
Previous Next
ERROR_FUNCTION_NOT_CALLED ERROR_INVALID_TABLE

ERROR_FUNCTION_FAILED

A Windows Installer function failed during execution.

ERROR_FUNCTION_FAILED is Win32 error 1627 (0x65B). In Windows Installer contexts it is a broad execution failure: the requested function was called, but its internal operation did not complete. The code is less specific than the detailed MSI log, custom-action return value, or preceding installer message. Treating 1627 as the root cause usually loses the evidence needed to identify the failing action, table operation, package API, or external helper.

Common origins

  • a custom action returned failure or raised an exception
  • an MSI database function could not complete against the current handle or transaction
  • a helper process, script, or service invoked by the package failed
  • package state changed between planning and execution
  • the caller supplied context that passed validation but failed during use

Evidence from the installer run

Enable verbose Windows Installer logging and preserve the complete log, command line with secrets redacted, product and package codes, operation mode, user/elevation context, custom-action name, and the first error preceding 1627. Record package, transform, and patch hashes. The final return code alone is not sufficient because rollback may add later messages that obscure the first failure.

How to isolate the failing function

Search backward from the final 1627 for the first action failure, MSI message number, or custom-action return. Reproduce with the same cached/source package and properties. If an API client receives 1627, log the exact MSI function, handle lifecycle, and database mode rather than grouping all installer calls under one retry.

For a custom action, run its business logic in an independent test harness where possible and verify bitness, working directory, impersonation, environment, and dependencies. Deferred actions receive a restricted property set; relying on arbitrary session properties can create execution-only failures.

Correction and retry

Fix the first concrete error, rebuild or re-sign the package if required, then rerun from a known product state. Do not repeatedly invoke repair while rollback is incomplete. Package authors should return precise error records, avoid hiding helper exit codes, and make deferred work transactional or reversible.

Difference from ERROR_FUNCTION_NOT_CALLED

ERROR_FUNCTION_NOT_CALLED means the function could not be executed at all. Error 1627 says execution began and failed. That distinction directs investigation toward runtime action details rather than only scheduling or sequencing.

Example

An MSI custom action launches a configuration utility under the service context. The utility assumes a user profile and exits nonzero, while the package reports 1627. The verbose log identifies the action; moving configuration to a properly authored deferred action with explicit data fixes the installation.

References


Looking for a different code? Search another status or error code.