Jason Smith
Posts: 2
Joined: Tue Jan 17, 2006 12:28 pm

Custom ACtion is rolling Back - Why?

Hi All,

I'm evaluating AI and have put together a simple example install with a single custom action (a dll file). The installer seems to be calling the action but fails and initiates a rollback, which is fine. However, I don't get any sort of error message to help me identify what the problem is! Is there a debug or logging option that I can use to try and identify what the custom action error code is etc?

Thanks..
Jason Smith
Posts: 2
Joined: Tue Jan 17, 2006 12:28 pm

Found the run & log option, but doesn't show any error message/number that may have been generated by the action.

So how does the installer know that there was an error to rollback?
Ionut
Posts: 605
Joined: Tue Nov 22, 2005 11:29 am
Contact: Website

Hi,

First of all, the Execution Property for your DLL Custom Action must check for the return code. If this is the case, your DLL function must return a value of 0 (ERROR_SUCCESS) to indicate successful execution. Windows Installer interprets any other return value as failure and it will rollback.

Note that Windows Installer translates the return values from all actions when it writes those values into the log file. For example, if the action return value appears as 1 in the log file, this means that the action returned ERROR_SUCCESS. For more information about this translation see:
http://msdn.microsoft.com/library/defau ... values.asp

In order to determine the (translated) return value from (Standard or Custom) Actions it might be helpful to save the log file on disk. Use a command line similar to the following:

Code: Select all

msiexec /i  package.msi /L*V! "install.log"
In order to identify the return values open the generated log file and search for the following string: "Action ended" (without quotes).

Note that if your Custom Action is Deferred it will be executed at the end of the setup sequence.

Questions:
1. On which Standard Action is your DLL Custom Action scheduled?
2. The Execution Option is set to Immediate or Deferred?

If you have any questions, please let me know. You can also send the log file to support at advancedinstaller dot com so I can determine what the problem is.

Regards,
Denis
Denis Toma
Advanced Installer Team
http://www.advancedinstaller.com/

Return to “Common Problems”