[Indexing Service is no longer supported as of Windows XP and is unavailable for use as of Windows 8. Instead, use Windows Search for client side search and Microsoft Search Server Express for server side search.]
Removes an existing catalog from the collection of catalog objects managed by an AdminIndexServer object. It can also delete the catalog directory from the system.
HRESULT RemoveCatalog( [in] BSTR bstrCatName, [in] VARIANT_BOOL fDelDirectory );
The name of an existing catalog to be removed.
To delete the directory and remove the catalog from the collection, set this to VARIANT_TRUE. To remove the catalog from the collection but leave the directory intact, set this to VARIANT_FALSE. Defaults to VARIANT_FALSE.
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Indexing Service must be stopped before a catalog can be removed.
' Remove the directory "src" from catalogs to be indexed, but don't delete it. objAdminIS.Stop 'Stop the indexing service objAdminIS.RemoveCatalog("src") objAdminIS.Start 'Start the indexing service up again
|Minimum supported client
||Windows 2000 Professional [desktop apps only]
|Minimum supported server
||Windows 2000 Server [desktop apps only]
|End of client support
|End of server support
||Windows Server 2008 R2