0

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 ??

Arun
  • 584
  • 1
  • 6
  • 19
  • 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 Oct 10 '12 at 11:23
  • 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 Oct 10 '12 at 11:44
  • mistyped install finalise as installfiles .. mybad !! :( – Arun Oct 10 '12 at 11:48
  • 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 software – Ivaylo Strandjev Oct 10 '12 at 11:53

1 Answers1

2

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

Christopher Painter
  • 54,556
  • 6
  • 63
  • 100
  • I understood it is not possible , i just wanted other solutions that are possible like a custom action to delete the files and folders or to initiate the uninstall automatically from the installer .. – Arun Oct 10 '12 at 13:33