Hi,
You cannot schedule a custom action to run before that Windows Installer error message. This message is displayed even before the package UI is initialized. But I don't understand why you need that?
You get this message because you are trying to install the same package but with a different "Package Code". The "Package Code" identifies a particular Windows Installer package and a new "Package Code" is generated with each build.
For example you have the package already installed and you make some modifications to the project and build it (new "Package Code" generated). To avoid that error message first uninstall the package from "Add/Remove Programs" or run it using "Project->Run" AI main menu option. In the second case AI will automatically perform the uninstall first.
Regards,
Gigi
______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com