InstallShield 2016 » InstallScript Language Reference
The SetFileInfo function sets the modify date or time stamp of an existing file or changes the file's attributes. To change both a file's date and time you must call SetFileInfo twice, once to change the date and once to change the time. However, you can set multiple file attributes with a single call to SetFileInfo by combining constants in nAttribute with the OR ( | ) operator.
Note • You can also use this function to change a folder's attribute. For example, you can use this function to create a hidden folder.
Syntax
SetFileInfo ( szPathFile, nType, nAttribute, szValue );
Parameters
Parameter |
Description |
|||||||||||||||
szPathFile |
Specifies the fully qualified name of the file or folder whose date, time, or attributes you want to change. |
|||||||||||||||
nType |
Specifies the file characteristic to change. Pass one of the following predefined constants in this parameter:
|
|||||||||||||||
nAttribute |
Specifies the file attribute when nType is FILE_ATTRIBUTE. (When nType is FILE_DATE or FILE_TIME, pass 0 in this parameter.) To specify more than one file attribute, combine one or more of the following predefined constants with the OR (|) operator:
|
|||||||||||||||
szValue |
Specifies one of the following, depending on the value you passed in nType:
|
Return Values
Return Value |
Description |
0 |
Indicates that the function successfully set the file's date stamp, time stamp, or attributes. |
< 0 |
Indicates that the function was unable to set the file's date stamp, time stamp, or attributes. |
See Also
InstallShield 2016 Help LibraryMay 2017 |
Copyright Information | Flexera Software |