ResumeBuild Method

This method resumes a build.

Syntax

IBuildCatalog.ResumeBuild

Example

The following example starts building the catalog specified by the KMSampleCatalog1 catalog definition, then displays a message box asking the user whether they would like to pause the build. If the user pauses the build, another message box appears asking the user whether they would like to resume the build.

Option Explicit 
On Error Resume Next

Dim objSearchAdmin, objBuildServer, objCatalogs, objCatalog 
Dim Prompt, Buttons, Title, Response

Set objSearchAdmin = CreateObject("Search.SearchAdmin.1")
Set objBuildServer = objSearchAdmin.BuildServer
Set objCatalogs = objBuildServer.BuildCatalogs 
Set objCatalog  = objCatalogs("KMSampleCatalog1")

Prompt = "Build started." & Chr(13) 
  & "Would you like to pause the build?"
Buttons = vbYesNo
Title = objCatalog.Name

objCatalog.StartBuild

Response = MsgBox(Prompt, Buttons, Title)

If Response = vbYes Then
  objCatalog.PauseBuild
   
   Prompt = "Build paused." & Chr(13) 
    & "Would you like to resume the build?" & Chr(13) 
    & "(No cancels the build)."
   Response = MsgBox(Prompt, Buttons, Title)
  
   If Response = vbYes Then
     objCatalog.ResumeBuild
   Else
     objCatalog.StopBuild
   End If
End If

'Release objects
Set objCatalog  = Nothing
Set objCatalogs = Nothing 
Set objBuildServer = Nothing
Set objSearchAdmin = Nothing 
 

See Also

PauseBuild, StartBuild, StopBuild


© 1997-1998 Microsoft Corporation. All rights reserved.