Defining user property value with regular expression - Advanced Installer Community
TheOneAndTheOnly1
Posts: 1
Joined: Sun Jun 25, 2017 8:53 am

Defining user property value with regular expression

Hello,

I want to create a property based with a value that contains regular expression.

For example:
property name: "TEST"
property value: C:\Users\MyPc\[a_a_a.*]\Folder

meaning that I want to have the value of the folder starting with 'a_a_a' name inside C\Users\MyPc.

How can I do that?

Thanks.
Sorin
Posts: 663
Joined: Mon May 08, 2017 1:03 pm

Re: Defining user property value with regular expression

Hello and welcome to our forums,

We do not have predefined support for this behaviour. However you could create your own custom action.

For example, you can create your custom action as a custom action written in C# or a custom action written in C++.

You can also use the VBScript or a PowerShell custom action to implement this functionality.

This custom action will resolve the expresion a_a_a.* and return the value to a property, called let's say VALUE .
Please take a look on our article : How to set an installer property using custom actions

This property will be used in a new set installer property custom action configured in the following way:
Property : TEST
Argument : c:\Users\MyPC\[VALUE]\Folder

Best regards,
Sorin
Sorin Stefan - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”