Pass values to Custom UI DLL function - 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!

tgillitzer
Posts: 36
Joined: Tue Dec 13, 2011 12:12 am

Pass values to Custom UI DLL function

I have successfully created a Custom Action using the "call function in standard DLL" and would like to recreate that as a UI Custom Action, however don't seem to be able to. That option is grayed out.

If I select New Attached Custom Action, I can select my DLL, and select the function, but I have no mechanism to pass it any values/parameters.

Any assistance?

Thanks
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Pass values to Custom UI DLL function

Hi and welcome to Advanced Installer forums,
I have successfully created a Custom Action using the "call function in standard DLL" and would like to recreate that as a UI Custom Action, however don't seem to be able to. That option is grayed out.
This predefined custom action will be available as an UI Custom Action starting with version 8.9 of Advanced Installer which should be out early next year. The reason it wasn't supported until now was due to a CustomActionData setback which was recently improved. If you are interested in a workaround until then, please let us know.
If I select New Attached Custom Action, I can select my DLL, and select the function, but I have no mechanism to pass it any values/parameters.
If you are developing a win32 DLL which receives the installation handle, you can use MsiGetProperty function to get a property.

Here are some related user guide references to help:
http://www.advancedinstaller.com/user-g ... #section20
http://www.advancedinstaller.com/user-g ... ll-std-dll

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
tgillitzer
Posts: 36
Joined: Tue Dec 13, 2011 12:12 am

Re: Pass values to Custom UI DLL function

Yes, I would be interested in info on the workaround.

Thanks
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Pass values to Custom UI DLL function

Here are the workaround steps you need to perform on your project:
- go to Custom Actions page
- add your "Call a function from a standard dll" custom action anywhere in the InstallExecuteSequence ( e.g. CallStdFcn )
- set its execution condition so something that will always resolve to false ( e.g. 1=2 )
- set its Action Data field accordingly and copy its content to the clipboard
- add any UI Custom Action ( e.g. YourUICustomAction )
- go to Dialogs page and select the "Next" button from a dialog
- add a "SetProperty" published event for it:
Name: [CustomActionData]
Argument: <paste_Action_Data_from_clipboard>
- add a "DoAction" published event after the one above:
Argument: YourUICustomAction
- go to Table Editor page, ControlEvent table
- find the "DoAction" published event and change its "Argument" column from YourUICustomAction to CallStdFcn

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
tgillitzer
Posts: 36
Joined: Tue Dec 13, 2011 12:12 am

Re: Pass values to Custom UI DLL function

I think I followed this correctly but am getting the following:

Cannot write script record. Transaction not started.
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Pass values to Custom UI DLL function

Hello,
- add your "Call a function from a standard dll" custom action anywhere in the InstallExecuteSequence ( e.g. CallStdFcn )
On this step, please try scheduling your custom action after InstallInitialize standard action.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
tgillitzer
Posts: 36
Joined: Tue Dec 13, 2011 12:12 am

Re: Pass values to Custom UI DLL function

I had it the "InstallFiles" action, which appears to be well after that.
tgillitzer
Posts: 36
Joined: Tue Dec 13, 2011 12:12 am

Re: Pass values to Custom UI DLL function

Any update on this?
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Pass values to Custom UI DLL function

Hello,

Sorry for the late reply, it seems we missed this post.

The Microsoft explanation for the error you are getting is:
"The InstallExecuteSequence may have been authored incorrectly. Actions that change the system must be sequenced between the InstallInitialize and InstallFinalize actions. Perform package validation and check for ICE77."

If you can't find anything obvious that could lead to this, can you please send us the .AIP ( project file ) to support at advancedinstaller dot com so we can investigate it?

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”