0
votes

I am creating a basic msi installer using installshield 2012 spring professional , here i have a custom dialog to collect some data from the user based on which i call a custom dll action to create a database inside the installation folder .

I have a scheduled a dll custom action to run After InstallFinalise , I want to check the return value from the dll and if the value indicates a failure i need to abort and rollback the installation process.

I have managed to catch the error and abort the installation but the issue is with the rollback .. Right now the installation aborts but the files are already created . How do i get the installation rolled back ? Is it possible .. Any ideas ??

1
I thought this should happen automatically if you return non-zero code from your action. What are the settings for your action? Probably you need to have set check return code.Ivaylo Strandjev
The rollback action based on error works automatically only if the error is returned before installfinalise , but the issue is before installfinalise, the files and folders are not created so i am executing the dll action after installfinalise ..Arun
mistyped install finalise as installfiles .. mybad !! :(Arun
I got you. Truth is I am a bit doomed to be using installshield 2008 and I saw some issues with uninstall - if install location is not an ASCII path uninstall would not remove some of the files from some of the components. That is why I wrote my own custom actions to clean up the files. I certainly hope this issue has been resolved in later versions of the softwareIvaylo Strandjev

1 Answers

2
votes

It is impossible to rollback after InstallFinalize. InstallInitialize and InstallFinalize mark the boundries of the windows installer transaction.

I suggest reading and understanding:

Installation Phases and In-Script Execution Options for Custom Actions in Windows Installer