Delete Files Section

A Delete Files section lists the files to be deleted. The file-list-section name must appear in the Delfiles item of an Install section.

[file-list-section]

file-name[,,,flag]

.

.

.

file-name

Identifies a file to be deleted. File-name must be defined in a SourceDisksFiles section.

flag

Optional. The following flags are available:

DELFLG_IN_USE (0x00000001)

Setting this flag deletes the file named in the item if the file is in use during the installation process. Set the flag to queue the file deletion operation until the system has restarted. If a file with this flag set cannot be deleted because it is in use, the system will restart after the device installation is complete.

If you do not use this flag along with a file-name parameter and the file is in use when the Delete Files section is executed, the file will not be deleted from the system.

DELFLG_IN_USE1 (0x00010000)

This flag is a high-word version of the DELFLG_IN_USE. Setting DELFLG_IN_USE1 causes the same behavior as setting DELFLG_IN_USE. Using DELFLG_IN_USE1 allows you to use the same section as Copy Files section and a Delete Files section without conflicting with the COPYFLG_WARN_IF_SKIP flag.

This example deletes three files:

[DeleteOldFilesSec]

file1

file2

file3