IPublisher.PublishPackage Method (String, String, String)

 

Applies To: Windows Server Update Services

Publishes a new package to the WSUS server.

Namespace:   Microsoft.UpdateServices.Administration
Assembly:  Microsoft.UpdateServices.Administration (in Microsoft.UpdateServices.Administration.dll)

Syntax

void PublishPackage(
    string sourcePath,
    string additionalSourcePath,
    string packageDirectoryName
)
void PublishPackage(
    String^ sourcePath,
    String^ additionalSourcePath,
    String^ packageDirectoryName
)
abstract PublishPackage : 
        sourcePath:string *
        additionalSourcePath:string *
        packageDirectoryName:string -> unit
Sub PublishPackage (
    sourcePath As String,
    additionalSourcePath As String,
    packageDirectoryName As String
)

Parameters

  • sourcePath
    Type: System.String

    Location of the source files to use to copy the InstallableItem InstallPointDirectory.

  • additionalSourcePath
    Type: System.String

    Location of additional source files to copy to the InstallableItem InstallPointDirectory. This is used to add files to a package that were not on the original source media (e.g. Office install configuration files) so they can be used during setup.

  • packageDirectoryName
    Type: System.String

    Optional name to use for the Package directory under the Applications server path. Can be null, in which case the directory name will be the Title_PackageId.

Remarks

PublishPackage() should never be used to publish a new revision of an update that has already been published to change the contents of the binaries of that package from one revision to the next as this is not a supported WSUS scenario. It is supported to call PublishPackage() to supply binaries to a package that was previously published as MetadataOnly. To re-publish an existing package with new binaries, first use the IUpdateServer.DeleteUpdate API to delete the original locally published package and then publish normally.

This operation requires WSUS Administrator privileges.

See Also

PublishPackage Overload
IPublisher Interface
Microsoft.UpdateServices.Administration Namespace

Return to top