Windows Installer Error 1721
Summary
Discussion on runtime error 1721 with InstallShield Express ProjectsSymptoms
When running an installation, the following error occurs:
Error 1721: There is a problem with this Windows Installer package. A program required for this install to complete could not be run. Contact your support personnel or package vendor.
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.
Note: The custom action attributes can be accessed by going to Custom Actions view under the Define the Setup Requirements And Actions view.
Cause 1
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
Cause 2
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. This option is only available in Express 4.0 and greater via the Source Location: File Exists on Target Computer custom action attribute.
Resolution
Resolution 1
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
Resolution 2
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
For more information on custom actions, see the InstallShield Help Library topics Custom Action Reference.
Additional information can be found in the Windows Installer Help Library topic Custom Actions.