You can use the AppDelete method of the IIsWebDirectory or IIsWebVirtualDir object to delete a Web application definition from a metabase key. If the application is running, it will be shut down. If the application is in-process with IIS, all resources associated with the application, such as out-of-process applications, will be released if the resource is not referenced by another in-process application.
Note Server component DLLs are not released from in-process applications, even if they are not currently referenced by other applications.
Deletions performed by using AppDelete cannot be undone.
DirObj.AppDelete
<%
Dim DirObj
Set DirObj = GetObject("IIS://LocalHost/W3SVC/1/ROOT/MyAppDir")
'Delete the application at this directory.
DirObj.AppDelete
%>
AppCreate, AppDeleteRecursive, AppUnload, AppUnloadRecursive, AppGetStatus, AppDisable, AppDisableRecursive, AppEnable, AppEnableRecursive, AspAppRestart