EnumWPPacks Method

The EnumWPPacks method of the SPGlobalAdmin class returns a string containing the URL and file name of the specified installed Web Part Package, or returns a string containing a list of all the Web Part Packages currently installed on the specified virtual server or front-end Web server.

Parameters

strName    A string that contains the name of a Web Part Package or that contains null.

strURL    A string that contains the URL for the virtual server or that contains null.

bEntireFarm   true to list Web Part Packages currently installed on a server farm; otherwise, false or null.

Return Value

A string that contains information about one or more installed Web Part Packages and whose format is different depending 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 null to return different output. The following table describes the return values for the various parameter settings.

bEntireFarm strName strURL Result
false null null Returns all Web Part Packages on the front-end Web server.
false null URL Returns all Web Part Packages on the specified virtual server on the front-end Web server.
true null URL Returns all Web Part Packages on the specified virtual server in the server farm.
null Name null Returns the specified Web Part Package.

Requirements

Platforms: Microsoft Windows Server 2003

Security: Code Access Security