Gogo
Posts: 8
Joined: Fri Aug 27, 2004 9:05 am

Question about "custom actions"

Hello,

I need to include a program that to be started in the very beginning of the instalaltion. I need this program to do some action before installation return "another version of this prduct is already installed......"

I tried differet settings for "custom action", but it seems that it is not possible Advanced Instalalr to start my program before this message for "another verson...." appear.

Any help will be appriciated :)
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

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
Gogo
Posts: 8
Joined: Fri Aug 27, 2004 9:05 am

Thanks for the fast reply.

Let me explain with more details why we need this feature.

We are developing software for 24/7 TV automation.

It is protected with hardware key. There is also maintenance plan for updates and support which date is included in the hardware key.

There is one our program that check the hardware wibu key is it in maintenance period or no, so then it allow the installation to continue or to stop.

So currently the customer need to uninstall the old version, then to run new installation.

The big problems came when the customer uninstall his old software and it is out of maintenance period, because the new installation will not run and many of the customers don't have in hand the old installation.

This lead some TV channels to stop broadcasting for 1-2 hours and to frustration in the clients.

So we need our software included in "custom action" to check the hardware key of the client and then to have this "uninstall message" if everything is OK with the hardware key.

It is not possible this "check" software to be separate program (not included in the installation package) because there are a lot of clients that don't read what is written in the web site and will not run this separate program.

If you have any idea how this can be done please let me know.
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,

On upgrade the older package is removed first, followed by the installation of the new one.

Older products are removed when the "RemoveExistingProducts" standard action reaches. So you can schedule your custom action that checks the validity of the key under "InstallUISequence->Begin" which is executed before "RemoveExistingProducts" action.

Now drag the custom action (while the shift key is pressed) to "InstallExecuteSequence->Begin" standard action.

Let me know how this works.

Regards,
Gigi
______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
Gogo
Posts: 8
Joined: Fri Aug 27, 2004 9:05 am

Thnks. I tried this already in Friday and it is working :)

Return to “Common Problems”