reversing Quotes for Codebase registry entry - 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!

daves
Posts: 2
Joined: Thu Jun 12, 2008 4:51 pm

reversing Quotes for Codebase registry entry

Hi

Is there a way of doing string replacement on a file path from one of the installed files

From a custom action i need to chage backslashes to forward slashes in an installed file property

ie

replace([#filename],"\","/") from withing the command line
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: reversing Quotes for Codebase registry entry

Hi,

You can replace a string in another string by using a custom action. Here is a sample VBScript custom action which does what you need for the MY_PATH property:

Code: Select all

Dim text
text=Session.Property("MY_PATH")
text=Replace(text,"\","/")
Session.Property("MY_PATH")=text
Note that this custom action must be set as Immediate in order to access installer properties. If you want to do this for the path of a file you can use a "Property set with formatted" custom action which sets the MY_PATH property to the path of the file.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”