Deployment Tools Foundation
DeleteOnClose Method (path)
Deployment Tools Foundation Namespaces ► Microsoft.Deployment.WindowsInstaller ► Database ► DeleteOnClose(String)
Schedules a file or directory for deletion after the database handle is closed.
Declaration Syntax
Parameters
- path (String)
- File or directory path to be deleted. All files and subdirectories under a directory are deleted.
Remarks
Once an item is scheduled, it cannot be unscheduled.
The items cannot be deleted if the Database object is auto-disposed by the garbage collector; the handle must be explicitly closed.
Files which are read-only or otherwise locked cannot be deleted, but they will not cause an exception to be thrown.