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!

Cmajda
Posts: 3
Joined: Tue Jun 24, 2014 2:23 pm

New Text File Update - resolved

Hello,
I have problem with function „New Text File Update“.
I need create msi package which does following steps:
1. Append some text in to file "%windir%\System32\drivers\etc\services"
2. Add some record to „HKEY_CURRENT_USER\Software\MyAplication“

My solutions
Create „New Text File Update“ of file "%windir%\System32\drivers\etc\services" – no problem
Add record to „HKEY_CURRENT_USER\Software\MyAplication“ –No problem
Because application hasn’t any exe file I have to use „active setup“ – No problem

Process
Msi package is installing under „SYSTEM“ account.
Msi installed and my text was appended in to file "%windir%\System32\drivers\etc\services"
Login under "normal user account" > going to execute „active setup“ (msiexec /fup {GUID}) and after “active setup” is my text in file "%windir%\System32\drivers\etc\services" twice. :(

Quesction
How to append my text only once? Or how to force execute function "New Text File Update" during active setup?

Project file is in attachment
Thank you for help.
Attachments
New_text_update.aip
My project
(13.83 KiB) Downloaded 322 times
Last edited by Cmajda on Thu Jun 26, 2014 12:04 pm, edited 1 time in total.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: New Text File Update

Hello and welcome to Advanced Installer forums,

Thank you for your interest in Advanced Installer.

In order to achieve what you want you can simply check the "Never Overwrite" attribute of the component under which your txt update is added. Just go to "Files and Folder" page and from the context menu of your txt update choose "Go To Component" option. Then, check the "Never Overwrite" attribute of the selected component. In this way the related component installation resources will not be reinstalled as long as its key path (i.e. "Version" registry value) already exists on target machine. However, please note that if the component registry path is missing from target machine when is performed a repair, then all the component installation resources (including the txt update) will be reinstalled during repair.

As another approach, in order to never perform the txt update during a repair operation you can condition the "AI_TxtUpdaterInstall" custom action. Just go to "Table Editor" page, select the "InstallExecuteSequence" table and edit the "Condition" field of the "AI_TxtUpdaterInstall" row like this:

Code: Select all

((NOT Installed) OR (REMOVE="ALL"))
Please keep in mind that when using this approach all txt updates added in your project will be ignored on repair mode. Also, our "Table Editor" feature is available only in "Enterprise" or higher project types.

If you have any question let us know.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Cmajda
Posts: 3
Joined: Tue Jun 24, 2014 2:23 pm

Re: New Text File Update

Hello Daniel,

I added attribute "Never Overwrite" of the component under which is my txt update. This solutions doesn't work. :cry:
But I added condition for custom action "AI_TxtUpdaterInstall" and this solutions works very well.

I have in mind that when using this approach all txt updates added in your project will be ignored on repair mode.

Thank you Daniel.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: New Text File Update

You're welcome.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”