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