sjeslis
Posts: 308
Joined: Mon Aug 22, 2011 11:40 pm
Contact: Website

File Search And Read Its Version Into A Property

I know how to do an extended file search but what's the best way to couple that with reading the found file's "version info" and storing it in a property?

Alternatively, I know where the file should be located so maybe I just need to read the file's version info.

Any way to do this without writing a C# custom action?
Scott Jeslis
Senior Software Engineer
Cicero, Inc.
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: File Search And Read Its Version Into A Property

Hi,

In order to achieve what you want, you can choose the "File Version" search type when you create your extended search. This will search for the file you specify and will store its version in the resulted property.

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

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
AnneTheAgile
Posts: 61
Joined: Wed Jun 08, 2011 9:53 pm

Re: File Search And Read Its Version Into A Property - Test

No matter what I do, I cannot right-click and 'test' the feature of getting a file's version? Even simply checking for the version of "C:\Windows\notepad.exe" shows 'empty'. This is in 10.3 and 9.8 as well. Does the test failure mean the search will fail?

Ref PM-7707
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: File Search And Read Its Version Into A Property

Hi,

Please keep in mind that in order to test a search you can use the [Test Search] toolbar button. Can you try to use that button and see if it works?

Also, if the "Required Versions" fields are empty the search will return "1" or will be empty ("1" if the file exists and empty if it does not exists). Otherwise, if those fields are not empty the search will return the version of the file if it matches the values written in those fields or will be empty if the version of the file does not match the written values.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”