InstallationManager.AddPackageAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
Platform::String
winrt::hstring
The name of the app to install.
Returns
Windows.Foundation.IAsyncOperationWithProgress<Windows.Phone.Management.Deployment.PackageInstallResult,unsigned int>
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
Platform::String
winrt::hstring
This API is not intended to be used directly from your code.
- instanceId
-
String
Platform::String
winrt::hstring
This API is not intended to be used directly from your code.
- offerId
-
String
Platform::String
winrt::hstring
This API is not intended to be used directly from your code.
Returns
Windows.Foundation.IAsyncOperationWithProgress<Windows.Phone.Management.Deployment.PackageInstallResult,unsigned int>
This API is not intended to be used directly from your code.
- Attributes
Windows requirements
App capabilities |
oemDeployment
|