Hi,
After moving it to the LaunchConditions (inside InstallExecuteSequence), there is no error, but nothing gets executed at the LaunchConditions time.
".Net Installer Class Action" custom actions can be run only after the installation of the files is complete ("InstallExecuteSequence" -> "InstallFiles" standard action), therefore you can not run it in under "LaunchConditions".
I'm having a hard time to understand how can I get the Installer class to intercept a custom action on a specific stage (LaunchConditions for instance), if the only methods and events I can have control over are "install,uninstall, commit and rollback" ?
In order to run a custom action when the launch conditions are checked, you can schedule that custom action under "InstallExecuteSequence" -> "LaunchConditions" standard action. You can see all the available standard actions by using the "New Standard Action" button on the toolbar (in the "Custom Actions" page).
Note that under the "LaunchConditions" sequence you
cannot schedule a ".Net Installer Class Action" custom action.
Basically how can I get any event or method on my class to trigger from LaunchConditions? (assuming that Launch Conditions check happen during the PrepareDlg).
I'm afraid this cannot be done using a ".Net Installer Class Action" custom action.
In order to run a custom action scheduled under "InstallExecuteSequence" -> "LaunchConditions" you can use a native DLL custom action.
You can read more about creating a native DLL using C++ here:
http://msdn2.microsoft.com/en-us/librar ... S.80).aspx
On how to create a DLL library in C and then use it with C#, please look here:
http://www.codeproject.com/csharp/UseCDLLlibinCS.asp
If you encounter any problems or you have questions, don't hesitate to ask.
Regards,
Cosmin
FOLLOW US
Get the latest news in Application Packaging