Controlling the number of installations from a CD - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

sjjjfay
Posts: 1
Joined: Tue Aug 19, 2008 1:42 pm

Controlling the number of installations from a CD

I can use assistance controlling the number of times my FM solution will install from a CD?

Steve
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Controlling the number of installations from a CD

Hi,

This could be done by monitoring through a file or registry entry the number of times the package is launched. When the package runs for the first time, it should execute a custom action. For a registry value, the custom action should work like this:
- determine if the target registry entry exists
- if it doesn't exist then create it
- if it exists modify it to increase the number of recorded launches
- determine if the maximum number of launches was reached and set an installer property accordingly

This custom action can be scheduled under the "InstallUISequence" -> "Begin" standard action. While the SHIFT key is pressed, drag and drop the custom action under "InstallExecuteSequence" -> "Begin" to share it between the two standard actions. Also, in the Custom Action Properties page you should set the "Execute only once if present in both sequence tables" option.

The property set by the custom action can be used as a custom launch condition. For example, the property can be set to "Launch" if the number of launches was not exceeded and to "No" if the package must not be launched. This can be verified by the custom launch condition to stop the installation and show a custom message to the user if the number of launches was exceeded.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”