Thunderbird - edit a existing text file - 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!

yurischultz
Posts: 1
Joined: Thu Dec 07, 2006 1:38 pm
Contact: Website

Thunderbird - edit a existing text file

Dear Srs,

I am experiencing problems during the customization of Mozilla Thunderbird package. During the distribution of MSI package I need to edit a file in an unespecified folder (I have to use the Search resource before), find some specific lines and delete them. Is there any prebuilt function in AI to do this? Is there a way to solve the problem?

Thanks in advanced and best regards.
Yuri Schultz
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,
I need to edit a file in an unespecified folder (I have to use the Search resource before), find some specific lines and delete them. Is there any prebuilt function in AI to do this? Is there a way to solve the problem?
This can be done only with a custom action. Create a file search in the "Search" page to find the file you want to modify.

With a VBS custom action you can modify that file indicated by the property of the search. To get the value of a property in a VBS custom action you can use this code:

Code: Select all

strFilePath = Session.Property("SEARCH_RESULT")
Where SEARCH_RESULT is the property of the search (in this property is stored the result of the search).

On how to create the custom action you can do like this:
1. Create a .vbs file with the VBS code in it.
2. Switch to "Custom Actions" page and add a "New Attached Custom Action" under "InstallExecuteSequence" standard action and browse for file just created.
3. Use (Not Installed) as execution condition for this custom action (will be executed only on install).

Hope this helps.

Best Regards,
Gigi
______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com

Return to “Common Problems”