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.
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
精彩评论