Dredgewood
Posts: 10
Joined: Wed Sep 12, 2018 8:54 am

New Event Custom Action argument empty

I've created a custom action, built etc.

Created in the custom actions section of AI. But when it comes to creating a new event control, I cannot select it from the Arument dropdown (the box is empty)

I Cannot find any useful documentation to help me around this either.

On a side note - is there any way a Custom action can be made using c# WITHOUT the use of Wix?
Catalin
Posts: 6582
Joined: Wed Jun 13, 2018 7:49 am

Re: New Event Custom Action argument empty

Hello,

Can you please double check that you have added your custom action without sequence? In order to trigger a custom action from within your dialog controls, you have to add it without sequence. To do so, simply press the "Add custom action without sequence" button which is placed to the right side of the custom action's name.

Quick note: If the custom action was added without sequence, it should not be displayed under the "Wizard Dialogs Stage" and under "Install Execution Stage".
On a side note - is there any way a Custom action can be made using c# WITHOUT the use of Wix?
Yes, you can create C# custom action without the use of Wix Toolset.

Hope this helps.

Kind regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Dredgewood
Posts: 10
Joined: Wed Sep 12, 2018 8:54 am

Re: New Event Custom Action argument empty

Thanks, it was the sequence issue.

Is there an example of a custom action documented somewhere?

I cannot see if my custom action is being executed - and a return value of 1 (which apparently mean success?)
I have tried using session.Log to see if I'm entering the action, but it does not log anything other than the "Beginning CA" and "return code = 1"
Dredgewood
Posts: 10
Joined: Wed Sep 12, 2018 8:54 am

Re: New Event Custom Action argument empty

I have also tried the debugging suggestion of putting in an messagebox - but that too doesn't get fired.
Catalin
Posts: 6582
Joined: Wed Jun 13, 2018 7:49 am

Re: New Event Custom Action argument empty

Hello,
Thanks, it was the sequence issue.
You're always welcome. I am glad you overcame this issue.
Is there an example of a custom action documented somewhere?
For this, you can have a look on the following article which I think you may find useful:

https://www.advancedinstaller.com/user- ... rp-ca.html
I cannot see if my custom action is being executed - and a return value of 1 (which apparently mean success?)
Yes, if an action returns "1" in the log file, it means success.
I have tried using session.Log to see if I'm entering the action, but it does not log anything other than the "Beginning CA" and "return code = 1"
My guess would be that your custom action is executed, but the code does not actually do anything (does not modify the system in any means).

Could you please tell me what are you trying to achieve through the custom action? Also, what custom action are you using? (From the fact that you have asked me about the use of WiX, I supposed that you were trying to create a C++/C# custom action --> "Call function from attached native DLL", etc.)

All the best,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”