cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
DexterMorgan
Level 3

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

Labels (1)
0 Kudos
(9) Replies
Jenifer
Flexera Alumni

Hi @DexterMorgan ,

 

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

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

Hi @DexterMorgan ,

 

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

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

Hi @DexterMorgan ,

 

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

Hello Jenifer,

 

long time I haven't posted.  I hope you are well.

 

But I still have troubles with searching for XML file. I've moved Action (please see in attachment) - without success. What am I doing wrong?

 

Best regards,

Bartosz

0 Kudos
mic_wat
Level 2

I have the same problem. Could it be that the CA.dll with the ISXmlAppSearch custom action only supports 32bit? I did a test in the System32 folder.
I copied an xml file to C:\Windows\System32 and another (same name but different tag values) to C:\Windows\SysWOW64.
I have a 64-bit installer. With System Search I look for the xml file in the C:\Windows\System32 folder. It is really found under C:\Windows\System32.
But the ISXmlAppSearch CA uses the xml from C:\Windows\SysWOW64 folder.
0 Kudos

I solved the problem by specifying the x64 DLL explicitly.
<ISProductFolder>\Redist\Language Independent\x64\ISXmlCfg.dll
0 Kudos

Hello mic_wat,

 

I don't see how our problems are the same? I've managed to solve my issue by creating Custom action script in vbs.

Best regards,
Bartosz

0 Kudos