Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Communication between the MSI and Custom Actions


1 reply to this topic

kthardin

kthardin
  • Members
  • 4 posts

Posted 10 March 2005 - 19:44

Presently I'm trying to install a third party application during the install of my MSI on the desktop. Problem is, that the third party application, which was built in Install Shield 6, did not come with the ability to make an appropriate ISS script for it's automation. So at present, I'm using a combination of Visual Basic 6 and the AutoIT DLL to automate the install.

At present there is no cause for concern, but on the off chance that something goes wrong with the automation I've encoded the ability for the visual basic program to terminate itself. Problem is I then want to tell the MSI that installation failed and to begin rollback. How do I do that (please include example code)?

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 11 March 2005 - 10:30

Let your exe return an exit code other than 0, and make sure your custom action isn't set to ignore the exit code. Any exit code other than 0 will be interpreted as error by Windows Installer. For a rollback your custom action must be of type deferred and must be scheduled between InstallInitialize and InstallFinalize.