h353655
Posts: 30
Joined: Wed Jun 21, 2017 2:51 pm

Replace in string

Fri Aug 11, 2017 11:59 am

I needed to persist a parameter, which had no default. This was sadly not possible, but then I set it to default = " " (one space). However, when the user enters stuff in the field, he sometimes forget to remove the space. Is there a way to trim a string?
Attachments
screenshotAI.png
screenshotAI.png (86.85KiB)Viewed 1890 times

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

Re: Replace in string

Fri Aug 11, 2017 1:24 pm

Hello,

Unfortunately we don't have predefined support for this beahvior. However, you can create you 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.

Please take a look on this article describing how to get/set Windows Installer properties in custom actions : How to set an installer property using custom actions

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

Return to “Building Installers”