|
Home > Archive > IIS Index Server > September 2004 > How to empty catalog using VBscript?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
How to empty catalog using VBscript?
|
|
| Yolande 2004-09-07, 5:57 pm |
| Hi there,
I want to use VBscript(JScript) to do the same task as the "empty catalog"
task when we use the computer management. Is ther any help?
Thanks in advance.
Yolande
| |
| Hilary Cotter 2004-09-07, 5:57 pm |
| you could use the AdminIndexServer class and call the RemoveCatalog method,
and then rebuild it.
Either that or stop your catalog, remove the catalog files, and then restart
your catalog.
--
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
"Yolande" <Yolande@discussions.microsoft.com> wrote in message
news:0F7415AD-A292-4193-A9AC-AFEF9ECD2A2F@microsoft.com...
> Hi there,
>
> I want to use VBscript(JScript) to do the same task as the "empty catalog"
> task when we use the computer management. Is ther any help?
>
> Thanks in advance.
>
> Yolande
| |
|
| > you could use the AdminIndexServer class and call the RemoveCatalog
method,
> and then rebuild it.
>
> Either that or stop your catalog, remove the catalog files, and then
restart
> your catalog.
Is it possible to save your registry key for IS to a .reg file then execute
this from vbscript?
Stu
| |
| Hilary Cotter 2004-09-08, 7:49 am |
| it sure is.
here is an example:
Set WSHShell = WScript.CreateObject("WScript.Shell")
strRegKey=" HKLM\SYSTEM\CurrentControlSet\Control\Co
ntentIndex\Catalogs\Syste
m\FilterFilesWithUnknownExtensions"
WScript.Echo WSHShell.RegRead(strRegKey)
You have to manually define all keys you want to read and write them to a
reg file.
You are probably better off creating a catalog through a reg file, bouncing
cisvc, and the catalog will be populated with the registry entries you need,
and then start adding scopes.
Here is what a sample reg would look like for this (Catalog is the name of
the catalog you are trying to create):
Windows Registry Editor Version 5.00
& #91;HKEY_LOCAL_MACHINE\SYSTEM\CurrentCon
trolSet\Control\ContentIndex\Catalogs\C
atalog]
"Location"="c:\\temp"
"IsIndexingW3Svc"=dword:00000001
"IsIndexingNNTPSvc"=dword:00000000
"W3SvcInstance"=dword:00000001
"GenerateCharacterization"=dword:00000001
"FilterFilesWithUnknownExtensions"=dword:00000000
"MaxCharacterization"=dword:00000140
& #91;HKEY_LOCAL_MACHINE\SYSTEM\CurrentCon
trolSet\Control\ContentIndex\Catalogs\C
atalog\Properties]
& #91;HKEY_LOCAL_MACHINE\SYSTEM\CurrentCon
trolSet\Control\ContentIndex\Catalogs\C
atalog\Scopes]
--
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
"Stu" <saet@steh.szerg> wrote in message
news:eRBVsNZlEHA.1712@TK2MSFTNGP09.phx.gbl...
> method,
> restart
>
> Is it possible to save your registry key for IS to a .reg file then
execute
> this from vbscript?
>
> Stu
>
>
|
|
|
|
|