InstallShield 2016 » Object Expressions for Advanced UI and Suite/Advanced UI Projects
To create an object expression that checks target systems for information about a file during an Advanced UI or Suite/Advanced UI installation, use the File object. The File object has support for properties such as Date and Version.
Syntax
[@File(FilePath,64Bit).Content]
[@File(FilePath,64Bit).Date(Parameter)]
[@File(FilePath,64Bit).Version]
Parameters
The following parameters are available for the File object.
| Parameter | Description | ||||||
| FilePath | Specify the path to the file. You can use property directory identifiers such as [ProgramFilesFolder]. | ||||||
| 64Bit | Use this optional Boolean parameter to indicate whether the file is in a 64-bit location, such as in the System32 folder on a 64-bit system. Valid options are: 
 
 If you omit this property, or if or the target system is running a 32-version of Windows, the installation checks the 32-bit location. | 
Properties
The following properties are available for the File object.
| Property | Description | |||||||||
| Content | If the file is a text file (for example, .txt, .htm, .xml, .config, .ini, or .sql), retrieves the contents of the file. | |||||||||
| Date | Retrieves the date and time for the file. Optional parameters that are available for this property are: 
 
 
 If you omit a parameter for the Date property, the File object returns the last-modified date. | |||||||||
| Version | Retrieves the version of the file. For an unversioned file, this property returns empty. | 
Examples
The following examples demonstrate use of the File object in object expressions
| Expression | Description | 
| [@File([ProgramFilesFolder]MyCompany\ | Obtain the last modified date and time for a file called MyProduct.exe. On 32-bit target systems, the path may be this: C:\Program Files\MyCompany\MyProduct.exe On 64-bit target systems, the path may be this: C:\Program Files (x86)\MyCompany\MyProduct.exe | 
| [@File([SystemFolder]notepad.exe).Version] | Obtain the version number of notepad.exe in the System32 folder on 32-bit target systems or in the SysWOW64 folder on 64-bit target systems. | 
| [@File([SystemFolder]notepad.exe,true).Version] | Obtain the version number of notepad.exe in the System32 folder on 32-bit and 64-bit target systems. | 
See Also
Using Formatted Expressions that Advanced UI and Suite/Advanced UI Installations Resolve at Run Time
Writing Object Expressions in Advanced UI and Suite/Advanced UI Projects to Search Target Systems
| InstallShield 2016 Help LibraryAugust 2016 | Copyright Information | Flexera Software |