次の方法で共有


SPGlobalAdmin.EnumWPPacks method

NOTE: This API is now obsolete.

Use the SPSolution class and other related solution objects to deploy Web Parts instead. (In Windows SharePoint Services 2.0, the EnumWPPacks method returned a string that contained the URL and file name of the specified installed Web Part package, or a string that contained a list of all the Web Part packages currently installed on the specified virtual server or front-end Web server, and is maintained for backward compatibility.)

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

Syntax

'Declaration
<ObsoleteAttribute("Use the SPSolution objects instead.", False)> _
Public Function EnumWPPacks ( _
    strName As String, _
    strUrl As String, _
    bEntireFarm As Boolean _
) As String
'Usage
Dim instance As SPGlobalAdmin
Dim strName As String
Dim strUrl As String
Dim bEntireFarm As Boolean
Dim returnValue As String

returnValue = instance.EnumWPPacks(strName, _
    strUrl, bEntireFarm)
[ObsoleteAttribute("Use the SPSolution objects instead.", false)]
public string EnumWPPacks(
    string strName,
    string strUrl,
    bool bEntireFarm
)

Parameters

  • strName
    Type: System.String

    A string that contains the name of a Web Part package or that contains a null reference (Nothing in Visual Basic).

  • strUrl
    Type: System.String

    A string that contains the URL for the virtual server or that contains a null reference (Nothing in Visual Basic).

  • bEntireFarm
    Type: System.Boolean

    true to list Web Part packages currently installed on a server farm; otherwise, false or a null reference (Nothing in Visual Basic).

Return value

Type: System.String
A string that contains information about one or more installed Web Part packages and whose format depends on which parameters are used.

Remarks

The EnumWPPacks method returns a different string depending on how the parameters are used. The parameters are not required and can be set to a null reference (Nothing in Visual Basic) to return different output. The following table describes the return values for the various parameter settings.

bEntireFarm

strName

strURL

Result

false

a null reference (Nothing in Visual Basic)

a null reference (Nothing in Visual Basic)

Returns all Web Part packages on the front-end Web server.

false

a null reference (Nothing in Visual Basic)

URL

Returns all Web Part packages on the specified virtual server on the front-end Web server.

true

a null reference (Nothing in Visual Basic)

URL

Returns all Web Part packages on the specified virtual server in the server farm.

a null reference (Nothing in Visual Basic)

Name

a null reference (Nothing in Visual Basic)

Returns the specified Web Part package.

See also

Reference

SPGlobalAdmin class

SPGlobalAdmin members

Microsoft.SharePoint.Administration namespace