asif0012
Posts: 44
Joined: Tue Nov 22, 2022 6:30 pm

How to use CustomActionData inside powershell inline script custom action

Hello,
I am using Advanced Installer version 20.6, Enterprise Edition.

I want to store around 10 properties in one custom action and use it in a separate custom action that will be executed at the deferred stage. The custom action type is "Powershell Inline Script". While using the "Powershell Inline Script" custom action in the deferred stage, I was unable to use Installer property values.

From here, I have found that I need to use "CustomActionData" to retrieve the property values.
https://www.advancedinstaller.com/acces ... -data.html

The example is with a *.vbs script.

How can I get and set the "CustomActionData" inside a "PowerShell Inline Script" custom action?

Best Regards,
Asif
Catalin
Posts: 6585
Joined: Wed Jun 13, 2018 7:49 am

Re: How to use CustomActionData inside powershell inline script custom action

Hello Asif,

Here's how you can retrieve the values of properties during the "Deferred" stage using the "CustomActionData":
Screenshot_130.png
Screenshot_130.png (6.26 KiB) Viewed 5032 times

If you have more properties to retrieve, simply add them there, like this:

Code: Select all

-varName [PROP_NAME_1] -varName2 [PROP_NAME_2]
and then:

Code: Select all

Param($varName, $varName2)
Hope this helps!

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

Return to “Building Installers”