user804723
user804723

Reputation: 349

Windows installer does not fail when custom action returns an error

I am trying to modify a custom action of type 3137 and a .dll source (with say a target DWORD InstallFunction( MSIHANDLE hInstall )) to return some error codes in certain situation and I am expecting that window installer fails and prompt me with an error message or something.

However, when I do return an ERROR_INSTALL_USEREXIT code (or any error code in that matter) from the module that has been called, the installer completely ignores the returned value and proceeds to complete the installation as if nothing has happened.

How do I get the installer to fail as well? I am new to the whole windows installer API/concept so I would truly appreciate any advise.

Upvotes: 2

Views: 922

Answers (1)

Ciprian
Ciprian

Reputation: 3565

The custom action has the msidbCustomActionTypeContinue flag set. Thus the installer ignores the return code. Removing this flag will solve the problem.

http://msdn.microsoft.com/en-us/library/windows/desktop/aa368071(v=VS.85).aspx

Upvotes: 2

Related Questions