cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Windows Installer Error 1721

Windows Installer Error 1721

Summary

Information about windows installer errors.

Symptoms

Error 1721 is a Windows error displayed in the following format:

There is a problem with this Windows Installer packager. A program required for this install to complete could not be run. Contact your support personnel or package vendor. Action: [2]. location: [3], command: [4].

Error 1721 will not always display the Action: [2], location: [3], or command: [4] portions of the error message.


Cause

In general, error 1721 is caused by a custom action that fails to launch or a file that is missing in the setup. Listed below are some common causes and their possible resolutions to this error message.

Resolution

A. Custom Action is Sequenced Incorrectly
A custom action has been sequenced incorrectly. For example, a file called MySample.exe is installed via a component and a deferred custom action of type "Installed with the Product" is used to launch the EXE. If the action is sequenced before the InstallFiles standard action, error 1721 occurs. This scenario produces the error because custom actions of this type must be sequenced after the InstallFiles standard action.

Verify that all custom actions included within the InstallUI or InstallExecute sequence have been sequenced properly. (See Additional Information for ways to verify that actions are sequenced correctly.) You can get to the sequence by following these steps:

  1. Select the Sequences view.

  2. Find the sequence into which the custom action has been inserted. (This is usually the Installation sequence.)

  3. Check both the User Interface and Execute sequences for the custom action.

B. Custom Action is Trying Access a File

A custom action has been set up incorrectly. For example, if a file called MySample.exe is installed via a component and an immediate custom action of type "Installed With The Product" is used to launch MySample.exe, error 1721 occurs. This scenario produces the error because the custom action must be deferred, not immediate. Files being installed with the product are not available to immediate custom actions.
Verify that, if the custom action is trying to access a file that is being installed with your product, the custom action is Deferred, Commit, or Deferred Execution in System Content and not Immediate Execution. Follow these steps to determine if the custom action is set up correctly:
  1. Select the Custom Actions view.

  2. Click the custom action so it is highlighted.

  3. Right-click the custom action and choose Custom Action Wizard.

  4. The Custom Action Wizard launches. Follow the wizard instructions until the Action Type panel is displayed. If the Location field says "Installed with the Product", proceed to the next step. If not, go to the next Resolution. If there is no location field or if the "Installed with the Product" option is not available, go to the next Resolution.

  5. Continue to step through the Custom Action Wizard to the Additional Options panel. Verify that the In-Script Execution field is set to Deferred, Commit, or Deferred Execution in System Content. If so, then this is not the cause of the issue. If not, then change the In-Script Execution to one of these options.

C. A Condition on the Custom Action Cause it To Launch at the Wrong Time

A condition such as "Installed" has been included on a custom action that causes the custom action to be launched at a time during the installation that causes it to return an error. For example, a file called MySample.exe is installed via a component and a deferred custom action of type "Installed With the Product" is used to launch the executable. In this case, a condition of "Installed", for example, would trigger error 1721. This scenario produces the error because the condition "Installed" launches the custom action only if the setup is running in maintenance mode. MySample.exe will already be uninstalled from the system at that point and will not be available for a deferred custom action.
Verify that conditions being used for custom actions are not causing the custom action to be launched at an incorrect time during the installation. Check for any custom properties that are being used as conditions and verify that they are being resolved to the correct values. Check for custom actions that have no condition at all. If you have custom actions without conditions, add a condition such as "Installed" (the custom action is launched only during maintenance mode), "Not Installed" (the custom action is only launched during initial mode), or 1 (the custom action launches every time the setup is run). To check for conditions on custom actions follow these steps:
  1. Select the Sequences view.

  2. Find the sequence into which the custom action has been inserted. (Normally it will be the Installation sequence.)

  3. Check both the User Interface and Execute sequences for the custom action.

  4. Once the custom action is found, click it and find the condition field in the property grid.

  5. Verify that the condition is valid and is resolving to the expecting value.

D. A setup that was downloaded has been corrupted.

Redownload the package and attempt another install of the setup.
E. Custom Action Invoked During Uninstall

If your installation contains a custom action that is installed with the product and is set to be invoked during uninstallation time, this error may occur while attempting to uninstall the product. A combination of the following custom action attributes cause this error message:

  • Source Location: Installed with the Product
  • Invoke: After Setup Progress Dialog
  • Execute: During Uninstallation

This error occurs because the custom action is being invoked after the application it is trying to execute has been uninstalled. To avoid this error message, make sure to invoke the custom action Before System Changes. The custom action attributes should be set as follows:

  • Source Location: Installed with the Product
  • Invoke: Before System Changes
  • Execute: During Uninstallation
F. Custom Action Launches a File That Already Exists on Machine
If the installation contains a custom action that launches a file that already exists on the machine, you may get this error message if the path to the file is invalid or if the file does not exist on the target machine.
Make sure that the file you are trying to launch via the custom action always exists on the machine and that the path to the file is valid. For example, Notepad.exe exists on all machines in the Windows directory. You would typically create a custom action to launch Notepad using the following custom action attributes:
  • Source Location: File Exists on Target Computer
  • File Location: [WindowsFolder]
  • File Name and Command Line: Notepad.exe

Additional Information

Sometimes a setup may be installed on the machine that can not be uninstalled because error 1721 occurs every time during the uninstallation. The cached MSI found in the \Installer folder can be modified with Orca so that the setup can be uninstalled.

Logging the installation can help narrow down which custom action is causing the error.

Note: This article applies to MSI-based installations.

Error 1721 is documented in the Windows Installer Help Library topic Windows Installer Error Messages.

The Installed property is documented in the Windows Installer Help Library topic Installed Property.

Deferred custom actions are documented in the Windows Installer Help Library topic Deferred Execution Custom Actions.

Labels (1)
Was this article helpful? Yes No
No ratings
Version history
Revision #:
1 of 1
Last update:
‎Dec 05, 2007 06:12 PM
Updated by: