zura
Posts: 14
Joined: Tue Aug 19, 2014 10:19 pm

search in app dir and launch conditions

Hello all,

I need to read settings from the previous installation and to launch search in the app folder I follow the article http://www.advancedinstaller.com/user-g ... earch.html
The problem is that appsearch action also contains all the other searches, including launch conditions, so this method (running appsearch after costfinalize) doesn't work if there are any launch conditions defined.

Can someone help me if I'm doing something wrong or this is indeed the behavior or AI?

Thanks,
zura
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: search in app dir and launch conditions

Hello Zura,

To achieve what you want you can schedule the "AI_RESTORE_LOCATION" custom action (during upgrade this custom action set the APPDIR to the previous installation path) to be executed before the "AppSearch" custom action. Just go to "Table Editor" page, select the "InstallExecuteSequence" table and edit the "Sequence" column of the "AI_RESTORE_LOCATION" so it be executed before the "AppSearch" (e.g. set it to 52).

Please note that our "Table Editor" feature is available starting with an "Enterprise" project type.

Let us know if this helped, otherwise please give us more details about your specific scenario.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
zura
Posts: 14
Joined: Tue Aug 19, 2014 10:19 pm

Re: search in app dir and launch conditions

Thanks Daniel,

I do have the Enterprise type and was able to change the sequence. Unfortunately I'm not able to test this because I'm having another issue that I wrote to support about and you're are helping me there too :)

Best,
Zura
salehi
Posts: 2
Joined: Tue Jan 05, 2016 2:46 pm

Re: search in app dir and launch conditions

Daniel wrote:Just go to "Table Editor" page, select the "InstallExecuteSequence" table and edit the "Sequence" column of the "AI_RESTORE_LOCATION" so it be executed before the "AppSearch"
Hello , to search in the APPDIR during uninstall , I try "running appsearch after costfinalize" and also your advice to change sequence in InstallExecuteSequence and also InstallUiSequence table , but they don't work!
I attach my project , I get search result to show in dialog and update in my config file.
Any help would be appreciated
Attachments
Your Application.aip
(20.24 KiB) Downloaded 521 times
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: search in app dir and launch conditions

Hello and welcome to our forums,

This happens because the XML searches are executed during the "AI_XmlLocator" custom action. So, you will have to move the "AI_XmlLocator" custom action after the "CostFinalize" action. Just go to "Table Editor" page. select the "InstallUISequence" table and edit the "Sequence" field of the "AI_XmlLocator" row to "1002". Repeat the steps for the "InstallExecuteSequence" table.

If you have any questions let us know.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
raghu.00a@gmail.com
Posts: 27
Joined: Tue May 10, 2016 11:18 am

Re: search in app dir and launch conditions

Hi,

I want to read a section <dependentAssembly/> from web.config while installer is running.
How to read web.config?
please help me.

Thanks
Raghu
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: search in app dir and launch conditions

Hello Raghu,

To achieve this you can use our XML Search support.

Let us know if this helped, otherwise please give us more details about your requirements.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
raghu.00a@gmail.com
Posts: 27
Joined: Tue May 10, 2016 11:18 am

Re: search in app dir and launch conditions

Hi,

My requirement is reading and updating web.config file as below

1.Before upgrading the application, the web.config was this
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="0.0.0.0-4.0.0.1" newVersion="4.0.0.1"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly>

2.while upgrading new installer, I want to replace the above configuration with the below one.
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly>

3.To achieve this, I am trying to use XMLSearch to read the above elements values into the property.
I moved the AI_xmlLocator custom action sequence after the "CostFinalize" action.
I want to know from where can I read the search values, am thinking to write custom action to read the search results.
In what event can I access the search results?.

4. Is there any built in facility to read and update the old web.config files.

Please advise me.
Regards
Raghu
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: search in app dir and launch conditions

Hello Raghu,

Please accept my apologies for such a delayed reply.

If you want to only get the "oldVersion" and "newVersion" values from the user during installation all you have to do is to import your XML file in "Files and Folders" page and edit the "oldVersion" and "newVersion" attributes to be set using two properties (e.g. OLD_VER_PROP and NEW_VER_PROP). Then, you can use on your setup dialogs (in "Dialogs" page) two edit box controls wher the user can type the versions at install time. These edit box controls should be associated with the above properties you use to set the XML attributes at install time. Please find attached a sample project which implements this settings.
sample.zip
(4.2 KiB) Downloaded 492 times
Let us know if this helped.

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

Return to “Common Problems”