

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.

C# | Visual Basic | Visual C++ |
public void DeleteOnClose( string path )
Public Sub DeleteOnClose ( path As String )
public: void DeleteOnClose( String^ path )

- path (String)
- File or directory path to be deleted. All files and subdirectories under a directory are deleted.

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)