This document is archived and information here might be outdated.  Recommended version.

IPackageFile.Unpack Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > EngineCore > ESRI.ArcGIS.EngineCore > Interfaces > IP > IPackageFile Interface > IPackageFile.Unpack Method
ArcGIS Developer Help

IPackageFile.Unpack Method

Unpacks a package.

[Visual Basic .NET]
Public Function Unpack ( _
    ByVal fileorURL As String, _
    ByRef pUnpackLocation As String _
) As IStringArray
public IStringArray Unpack (
    string fileorURL,
    ref string pUnpackLocation
  BSTR fileorURL,
  System.String* pUnpackLocation
fileorURL [in]

fileorURL is a parameter of type BSTR pUnpackLocation [in, out]
pUnpackLocation is a parameter of type BSTR*

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.


The Unpack method requires a reference to a string and the path to the package that is being unpacked.  Developers can pass in a string to the location they want the package to unpack to.  This should be a general location.  After the package unpacks the string will be updated with the path to the content of the package.  For example, if a you are unpacking a Map Package to c:\Packages, the unpack location string will be updated to the path to the MXD.

If a package has been previously unpacked to a different location the path to the previous location will be returned.  Passing in an empty string will use the default package location.

The unpack method returns a StringArray containing the path to the package content.


The unpack method does not support Geoprocessing Packages.

See Also

IPackageFile Interface