cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
TheDarkDefender
Flexera beginner

search for xml value doesn't work - doesn't find a file

Hello,

it's my first post on this forum, hope I'll write it correctly.

So, I am trying to modify XML values.
I am searching it in System Search Wizard - XML file Value. I am putting File Name; Look in (full path) and setting all other necessary  fields.

When I look into log file created after instalaltion I have:
InstallShield 08:49:12: Searching for an XML Attribute value using the Element 'INFO' and the Attribute 'Build'.
MSI (c) (50!10) [08:49:12:506]: Closing MSIHANDLE (42) of type 790531 for thread 10512
MSI (c) (50!10) [08:49:12:506]: Creating MSIHANDLE (43) of type 790540 for thread 10512
MSI (c) (50!10) [08:49:12:506]: Creating MSIHANDLE (44) of type 790531 for thread 10512
MSI (c) (50!10) [08:49:12:506]: Closing MSIHANDLE (43) of type 790540 for thread 10512
MSI (c) (50!10) [08:49:12:506]: Closing MSIHANDLE (44) of type 790531 for thread 10512
MSI (c) (50!10) [08:49:12:507]: Creating MSIHANDLE (45) of type 790540 for thread 10512
MSI (c) (50!10) [08:49:12:507]: Creating MSIHANDLE (46) of type 790531 for thread 10512
MSI (c) (50!10) [08:49:12:507]: Closing MSIHANDLE (45) of type 790540 for thread 10512
MSI (c) (50!10) [08:49:12:507]: Closing MSIHANDLE (46) of type 790531 for thread 10512
MSI (c) (50!10) [08:49:12:507]: Creating MSIHANDLE (47) of type 790531 for thread 10512
InstallShield 08:49:12: The location of the XML file, stored in the Property 'VERSION', is currently a NULL value. It appears that the AppSearch did not find the file.
MSI (c) (50!10) [08:49:12:507]: Closing MSIHANDLE (47) of type 790531 for thread 10512
MSI (c) (50!10) [08:49:12:507]: Closing MSIHANDLE (41) of type 790531 for thread 10512
MSI (c) (50!10) [08:49:12:508]: Creating MSIHANDLE (48) of type 790531 for thread 10512
MSI (c) (50!10) [08:49:12:508]: Closing MSIHANDLE (48) of type 790531 for thread 10512
MSI (c) (50!10) [08:49:12:508]: Closing MSIHANDLE (33) of type 790540 for thread 10512
MSI (c) (50!10) [08:49:12:508]: Closing MSIHANDLE (29) of type 790541 for thread 10512
MSI (c) (50:50) [08:49:12:509]: Closing MSIHANDLE (28) of type 790542 for thread 1988
Action ended 08:49:12: ISXmlAppSearch. Return value 1.

-----------------------------

 

But If I search before for a file in separate System Search for a file (using it GUID) and append it to property it works (I have to set it in XML System Search like File Name; Look in (A path found in previous search).

Do you know an idea why? I don't want to search it by GUID, because from time to time it's changing.

Best regards

0 Kudos
5 Replies
Flexera Jenifer
Flexera

Re: search for xml value doesn't work - doesn't find a file

Hi @TheDarkDefender ,

 

how about using XML File changes view?You can find it more handy than using system-search wizard?

More details can be found:

https://helpnet.flexerasoftware.com/installshield25helplib/helplibrary/XML-Overview.htm?

 

Thanks,

Jenifer

0 Kudos
TheDarkDefender
Flexera beginner

Re: search for xml value doesn't work - doesn't find a file

Hello Jenifer,

so, I wasn't precise about that. I want to take a value from previously installed XML, and write it in new installed XML (it's an upgrade of product - new version I can say). I have attached file with my settings.

 

Best regards,

Bartosz

 

0 Kudos
Flexera Jenifer
Flexera

Re: search for xml value doesn't work - doesn't find a file

Hi @TheDarkDefender ,

 

You are getting the error in Msi log due to sequence order of custom actions.You can get it working by passing windows installer directory value than INSTALLDIR.

More detailed explanation below:

  • AppSearch,ISXmlAppSearch are the custom actions associated with system search,these are sequenced and expected to run in the very beginning of installation UI sequence.
  • At this sequence time,none of the directory resolving would have happened.So INSTALLDIR is unknown
  • The same applies for files being installed,files might not have installed at this time.So trying to access values from files being installed as part of installation won't work.
  • You can use only Windows Installer directories such as 
    • WindowsVolume
    • Windows
    • LocalAppDataFolder
    • ProgramFilesFolder(In your case,if you want to access values from the existing file,you can use this [ProgramFilesFolder]XXX\XXX)

Thanks,

Jenifer

 

0 Kudos
TheDarkDefender
Flexera beginner

Re: search for xml value doesn't work - doesn't find a file

Hello Jenifer,

ok, I see you point.

But it works when I know exact path of the previous installation. For example:

 [ProgramFilesFolder]TEST_PATH\NEWFOLDER

But when I don't know it this won't work (user can change our path during installation). I need something flexible, what will find file. Do you have an idea what it might be?

Best regards,
Bartosz

0 Kudos
Flexera Jenifer
Flexera

Re: search for xml value doesn't work - doesn't find a file

Hi @TheDarkDefender ,

 

Not a good way,but it can be achievable by moving custom action sequences:

  • Navigate to BEHAVIOR AND LOGIC->Custom Actions and Sequences
  • You can move your ISXmlAppSearch custom action from Execute sequence next to CostInitialize custom action.

Make this change with caution,since it is a default custom action provided by InstallShield assuming it will be used for system searches/xml file values from pre-defined folders.Make sure nothing breaks because of this change.

 

Thanks,

Jenifer

0 Kudos