InstallationManager.AddPackageAsync Method

Definition

Overloads

AddPackageAsync(String, Uri)

Starts the installation process for the app specified by the app title and location URI.

AddPackageAsync(String, Uri, String, String, Uri)

This API is not intended to be used directly from your code.

AddPackageAsync(String, Uri)

Starts the installation process for the app specified by the app title and location URI.

public:
 static IAsyncOperationWithProgress<PackageInstallResult ^, unsigned int> ^ AddPackageAsync(Platform::String ^ title, Uri ^ sourceLocation);
/// [Windows.Foundation.Metadata.Overload("AddPackageAsync")]
 static IAsyncOperationWithProgress<PackageInstallResult, uint32_t> AddPackageAsync(winrt::hstring const& title, Uri const& sourceLocation);
[Windows.Foundation.Metadata.Overload("AddPackageAsync")]
public static IAsyncOperationWithProgress<PackageInstallResult,uint> AddPackageAsync(string title, System.Uri sourceLocation);
function addPackageAsync(title, sourceLocation)
Public Shared Function AddPackageAsync (title As String, sourceLocation As Uri) As IAsyncOperationWithProgress(Of PackageInstallResult, UInteger)

Parameters

title
String

The name of the app to install.

sourceLocation
Uri Uri

The URI location of the app to install.

Returns

IAsyncOperationWithProgress<PackageInstallResult,UInt32>

IAsyncOperationWithProgress<PackageInstallResult,uint32_t>

The asynchronous operation that represents the installation process.

Attributes

Examples

void InstallMyCoolApp()
{
    Uri uri = new Uri(@"https://PlaceHolderServerName/XAP/MyCoolApp.xap");
    string appTitle = "Cool App";

    Windows.Foundation.IAsyncOperationWithProgress<PackageInstallResult, uint> result;

    // Queue up an installation request.
    result = InstallationManager.AddPackageAsync(appTitle, uri);

    // Note: You could save "result" as a member variable to enable 
    // the installation to be cancelled later.
}

See also

Applies to

AddPackageAsync(String, Uri, String, String, Uri)

This API is not intended to be used directly from your code.

public:
 static IAsyncOperationWithProgress<PackageInstallResult ^, unsigned int> ^ AddPackageAsync(Platform::String ^ title, Uri ^ sourceLocation, Platform::String ^ instanceId, Platform::String ^ offerId, Uri ^ license);
/// [Windows.Foundation.Metadata.Overload("AddPackagePreloadedAsync")]
 static IAsyncOperationWithProgress<PackageInstallResult, uint32_t> AddPackageAsync(winrt::hstring const& title, Uri const& sourceLocation, winrt::hstring const& instanceId, winrt::hstring const& offerId, Uri const& license);
[Windows.Foundation.Metadata.Overload("AddPackagePreloadedAsync")]
public static IAsyncOperationWithProgress<PackageInstallResult,uint> AddPackageAsync(string title, System.Uri sourceLocation, string instanceId, string offerId, System.Uri license);
function addPackageAsync(title, sourceLocation, instanceId, offerId, license)
Public Shared Function AddPackageAsync (title As String, sourceLocation As Uri, instanceId As String, offerId As String, license As Uri) As IAsyncOperationWithProgress(Of PackageInstallResult, UInteger)

Parameters

title
String

This API is not intended to be used directly from your code.

sourceLocation
Uri Uri

This API is not intended to be used directly from your code.

instanceId
String

This API is not intended to be used directly from your code.

offerId
String

This API is not intended to be used directly from your code.

license
Uri Uri

This API is not intended to be used directly from your code.

Returns

IAsyncOperationWithProgress<PackageInstallResult,UInt32>

IAsyncOperationWithProgress<PackageInstallResult,uint32_t>

This API is not intended to be used directly from your code.

Attributes

Windows requirements

App capabilities
oemDeployment

See also

Applies to