ckovamees
Posts: 18
Joined: Fri Aug 05, 2011 3:16 pm

AI_XmlLocator not finding any file/variables?

I'm looking for some advice of why AI_XmlLocator would not get executed correctly in my project. I'm using 8.6 and have two XML Searches (for installed files) and one registry search.

During an upgrade it's looking for two different files. The test project finds them and reads the values everytime. It seems like my real project can't find the files (or don't know what files to search in). When I "test" the search from inside AI then all variables are found.

I have a test project where it works just great. Then in my real project I have the same (as far as I know) search. But in the real project none of the AI_XMLLocator actions return any of the values that the test project finds.

Out output from my test project:

Code: Select all

Action start 9:25:52: AI_XmlLocator.
MSI (s) (D0:48) [09:25:52:833]: Invoking remote custom action. DLL: C:\Windows\Installer\MSI1630.tmp, Entrypoint: OnXmlLocator
AI_XmlLocator: Executing XML file: "C:\Program Files (x86)\Your Company\Your Application\TargetWeb.xml" locators
MSI (s) (D0!5C) [09:25:52:882]: PROPERTY CHANGE: Adding AssetStoragePath property. Its value is 'c:\Archive\Assets'.
MSI (s) (D0!5C) [09:25:52:882]: PROPERTY CHANGE: Adding ReadSiteId property. Its value is 'eeff7271-c0aa-4181-99d1-639683d54fc4'.
AI_XmlLocator: Executing XML file: "C:\Program Files (x86)\Your Company\Your Application\Target.xml" locators
MSI (s) (D0!5C) [09:25:52:883]: PROPERTY CHANGE: Adding ReadInstallationGuid property. Its value is 'F51EECE1-97E2-42B2-BA91-2693BE8C2357'.
Action ended 9:25:52: AI_XmlLocator. Return value 1.
This is the log from my real project:

Code: Select all

MSI (s) (80:40) [05:35:43:325]: Doing action: AI_XmlLocator
Action 5:35:43: AI_XmlLocator. Executing XML locators
Action start 5:35:43: AI_XmlLocator.
MSI (s) (80:84) [05:35:43:350]: Invoking remote custom action. DLL: C:\Windows\Installer\MSIB8B5.tmp, Entrypoint: OnXmlLocator
Action ended 5:35:43: AI_XmlLocator. Return value 1.

Any advise for what to look for is appreciated!


/Carl
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: AI_XmlLocator not finding any file/variables?

Hi Carl,

There is probably a small problem with the configuration, can you please check again you have the same settings for the searches and also that the target XML
files are available?

If you cannot find the problem you can send the project files over to support at advancedinstaller dot com so we can analyze them.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
ckovamees
Posts: 18
Joined: Fri Aug 05, 2011 3:16 pm

Re: AI_XmlLocator not finding any file/variables?

Thanks,

I just noticed that the working search used [APPDIR]Target.xml, while the not working project used a sub-directory specified with the directories property. E.g. [MySub_Dir]Target.xml.

When I changed the search path to [APPDIR]MySub\Target.xml it worked just fine!


/Carl
ckovamees
Posts: 18
Joined: Fri Aug 05, 2011 3:16 pm

Re: AI_XmlLocator not finding any file/variables?

Additionally - perhaps I'm missing something...

But, when I run this msi unattended or from the command-line (Run as Adminsitrator) msiexec /i ..., the AI_XMLLocator is not picking up my files. When I run it by right-click the msi and selecting Install they are picked up (I do get an elevation dialog from UAC). (?)

Ideas?
ckovamees
Posts: 18
Joined: Fri Aug 05, 2011 3:16 pm

Re: AI_XmlLocator not finding any file/variables?

More information, the exact same project (and compile) doesn't behave when I use the /passive option to msiexec.

According to http://www.advancedinstaller.com/user-g ... e-std.html there should be AppSearch in both the InstallUISequence and the InstallExecuteSequence.

It looks like AI_XMLLocater is executed but it doesn't find the file/variables.
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: AI_XmlLocator not finding any file/variables?

Hi Carl,

The problem with the passive install is that you are making a search under APPDIR, which when installed silently, is resolved after the searches are executed.

The solution is to go in Table Editor page, locate InstallExecuteSequence table and move the following actions, by editing their "Sequence" column, before the action "AI_XmlLocator".
The actions that you need to move are "AI_RESTORE_LOCATION" and "SET_APPDIR", also make sure you maintain the same order between the two of them, as this is very important.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
jpro
Posts: 5
Joined: Fri Oct 25, 2013 2:20 pm

Re: AI_XmlLocator not finding any file/variables?

Thanks for the solution, I am in the same context (passive mode and initialize properties with search) and it doesn't work.
Is there anything I can do to use passive mode and xml search ?
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: AI_XmlLocator not finding any file/variables?

Hello,

Can you please give us more details about your specific scenario (maybe exemplify) so we can be able to properly analyze it?

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

Return to “Common Problems”