ZakiTNT
Posts: 7
Joined: Wed Nov 16, 2022 3:10 am

Use property in standard DLL

Wed Feb 08, 2023 5:13 am

Hi,
I would like to know how to use a property in "call function in standard DLL custom action (deferred state).

The scenario:
1) pass public parameter during installation
mysetup.exe /exenoui /qn /norestart MYINFO="COMPANY" MYNUM="12345"


2) If I set one of the argument in the DLL custom action to use MYINFO, it doesn't work, which is expected because deferred state cannot use installer property.

https://www.advancedinstaller.com/user- ... ction.html

3) From the above URL, I've tested it with the Action data to was set to MYINFO property and the vbscript can prompt the correct value in deferred state.

But how to apply this to standard DLL custom action? Is it even possible to do this? Is there a way for me to check whether the MYINFO property value were correctly passed to the DLL or not?

Thank you.

EDIT:
I'm using AI version 15.3.
Last edited by ZakiTNT on Wed Feb 15, 2023 3:25 am, edited 1 time in total.

Catalin
Posts: 6542
Joined: Wed Jun 13, 2018 7:49 am

Re: Use property in standard DLL

Wed Feb 08, 2023 3:25 pm

Hello,

In order to achieve what you want, you can set the "CustomActionData" property to your desired value during the "Immediate" stages of the installation process and the later get the value of CustomActionData in your .DLL and work with it.
Screenshot_82.png
Screenshot_82.png (89.7KiB)Viewed 5932 times
Screenshot_83.png
Screenshot_83.png (84.66KiB)Viewed 5932 times
Screenshot_84.png
Screenshot_84.png (10.52KiB)Viewed 5932 times
Screenshot_85.png
Screenshot_85.png (47.31KiB)Viewed 5932 times

Hope this helps!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

ZakiTNT
Posts: 7
Joined: Wed Nov 16, 2022 3:10 am

Re: Use property in standard DLL

Mon Feb 13, 2023 4:08 am

Hi Catalin,

Thank you for your reply.

I've tried your suggestion and it can work where the deferred message box can output the correct value passed from command line.

However, it doesn;t work when I try to use the property as the value binding for the DLL argument. This will return empty.

I've to use Inline value for the Value Binding and set it to the correct formatted property.

Thank you again for your help. :D

Catalin
Posts: 6542
Joined: Wed Jun 13, 2018 7:49 am

Re: Use property in standard DLL

Tue Feb 14, 2023 4:29 pm

You are always welcome!

And thank you for sharing your solution with us.

I'm sure this will be helpful for further users facing a similar scenario.

Best regards,
Catalin
:)
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”