DeleteOnClose Method (path)

Microsoft Deployment Compression & Installer

Copy image CopyHover image
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.dll) Version: 3.0.0.0 (3.9.1006.0)