Starting and Stopping Indexing Service

Note

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.

 

These code segments use the Start and Stop methods of the gCiAdmin AdminIndexServer object to start and stop the scanning and indexing components of Indexing Service. The StartCisvc_Click procedure is called when the Start command is clicked, and the StopCisvc_Click procedure is called when the Stop command is clicked.

Private Sub StartCisvc_Click()
...
    gCiAdmin.Start  ' Start cisvc.exe service.
    Sleep (30000)   ' Give time for cisvc.exe to run.
    StopCisvc.Enabled = True
    StartCisvc.Enabled = False
...
End Sub
...
Private Sub StopCisvc_Click()
...
    gCiAdmin.Stop   ' Stop cisvc.exe service.

    StopCisvc.Enabled = False
    StartCisvc.Enabled = True
...
End Sub