vicky
Posts: 66
Joined: Thu Aug 21, 2008 10:52 am

Rollback installation

Hi!

I would like to know if I return ERROR_INVALID_FUNCTION from my custom action code(VC++) on "InstallFinalize" action then will Msi rollback the installation or not?

If, not, then what will be the appropriate place/action to add my custom action? My custom action must be fired after copying all the files and writing registry values.

Thanks in advance.

Regards,
Vicky
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Rollback installation

Hi Vicky,
I would like to know if I return ERROR_INVALID_FUNCTION from my custom action code(VC++) on "InstallFinalize" action then will Msi rollback the installation or not?
Please note that ERROR_INVALID_FUNCTION is not a valid return code for a custom action, perhaps you are referring to ERROR_FUNCTION_NOT_CALLED. If a custom action returns this value before "InstallFinalize" then the installation will be rolled back. However, if the custom action is executed after "InstallFinalize", a rollback can no longer be performed.
then what will be the appropriate place/action to add my custom action? My custom action must be fired after copying all the files and writing registry values.
The files are installed during the "InstallFiles" standard action and the registry entries are created during the "WriteRegistryValues" standard action. Therefore, you can try scheduling your custom action after "WriteRegistryValues" and before "InstallFinalize".

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”