DeleteOnClose Method (path)

Microsoft Deployment Tools

Deployment Tools Foundation DeleteOnClose Method (path)
Deployment Tools Foundation NamespacesMicrosoft.Deployment.WindowsInstallerDatabaseDeleteOnClose(String)
Schedules a file or directory for deletion after the database handle is closed.
Declaration Syntax
C# Visual Basic Visual C++
public void DeleteOnClose(
	string path
)
Public Sub DeleteOnClose ( _
	path As String _
)
public:
void DeleteOnClose(
	String^ path
)
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.

Assembly: Microsoft.Deployment.WindowsInstaller (Module: Microsoft.Deployment.WindowsInstaller) Version: 3.0.0.0 (3.5.1623.0)