The IWamAdmin::AppDelete method deletes a Web application definition from this metabase key, and optionally all subordinate keys. If the application is running, it will be shut down. All resources associated with the application, such as out-of-process packages, will be released. This action cannot be undone.
HRESULT STDMETHODCALLTYPE AppDelete( LPCWSTR szMDPath, // [string][unique][in] BOOL fRecursive // [in] );
The method will return NO_ERROR if the method succeeded, including the case that no application was defined at the specified path. If the method fails, other error codes converted to HRESULT will be returned.