Udostępnij za pośrednictwem


UWP App Installs from Web via App Installer

We have introduced App Installer in the Windows 10 Anniversary Update to make installation of universal windows apps simple to install. With the App Installer, a user just has to double-click the app package to install.

Since the introduction of App Installer, we are heartened by the positive feedback that we received. So we are excited to announce the ability to directly install from web, to install related sets and the ability to auto-update apps with Windows 10 Fall Creators Update.

App Installer version greater than 1.0.12271.0 is required to support the new features.

Direct Web Install

Typically, an app package needs to be locally available on device before it can be installed with the App Installer. For the web scenario, this means that the user must download the app package from the web server, after which it can be installed with App Installer. In the case of an app bundle where the package can contain the resources for all languages and assets for different scale factors, having to download it would waste a lot of disk space and time, which is why App Installer now has built features to streamline this process.

App Installer can install an app directly from a web server. When the user clicks on an app package hosted web link, App Installer is invoked automatically. The user is then taken to the app info view in App Installer and is then one click away from engaging directly with the app.

The direct app install is only available in the Windows 10 Fall Creators Update and newer. Previous versions of Windows (going back to the Windows 10 Anniversary Update) will be supported by the web install experience on previous versions of Windows 10. This experience provides significant improvements to the existing app install procedure.

How does direct web install work?

Protocol Activation Scheme

We introduced a new protocol activation scheme that is already registered in the OS to invoke App Installer. When a user clicks a app package hosted web link with our registered scheme, App Installer is invoked. This activation mechanism is browser independent and so is beneficial to site administrators who can now be agnostic of the browsers while incorporating app packages into their web sites.

Requirements for protocol activation scheme

  1. Web servers that support byte range requests (HTTP/1.1)
    • App Packages need to be hosted on servers that support HTTP/1.1 protocol

How to enable this on your webpage

Users who want to host app packages on their web sites need to follow this step:

Prefix your app package URIs with the activation scheme 'ms-appinstaller:?source=' referencing them on your webpage

 

<html>
   <body>
     <h1>MyApp Web Page</h1>
     <a href="ms-appinstaller:?source=https://mywebservice.azureedge.net/HubApp.appx"> Install app package </a> 
     <a href="ms-appinstaller:?source=https://mywebservice.azureedge.net/HubAppBundle.appxbundle"> Install app bundle </a> 
     <a href="ms-appinstaller:?source=https://mywebservice.azureedge.net/HubAppSet.appinstaller"> Install related set </a>
    </body>
</html>

Web install experience on previous versions of Windows 10

On versions prior to the Fall Creators Update, App Installer cannot directly install the app from the web. On these versions, App Installer can only install app packages that are locally available.
So, App Installer will download the package and require the user to double click the downloaded package to install.

Microsoft SmartScreen integration

Microsoft SmartScreen has always been part of the installation process for installing apps via App Installer. SmartScreen ensures users are safeguarded from the malcontent that can make its way on to their devices. With the latest update to App Installer, SmartScreen is a AI powered module that will intelligently detect unsafe apps and warn the users accordingly.

Click here to learn more about installing a related set or learn how to auto-update your apps that are distributed using App Installer.

We hope that these new additions will give you more options to share and distribute UWP apps with your users. We are very interested in hearing your feedback. Please post your comments and questions below.

Thanks!
Chaitanya Donthini, Program Manager – Windows Developer Platform

Comments

  • Anonymous
    September 26, 2017
    Great! Direct Web install is truly straightforward for end users.I have one q ... Is this applicable for all modern web browsers? or only on Microsoft Edge?
    • Anonymous
      September 27, 2017
      with the activation scheme 'ms-appinstaller:?source=' it will work with any browser.
  • Anonymous
    September 27, 2017
    Good news. How does this handes updates? Specially for highly updated LOB applications.
  • Anonymous
    September 27, 2017
    "Click here" link for auto-update topic isn't there.
    • Anonymous
      September 27, 2017
      Should be fixed now
  • Anonymous
    October 10, 2017
    A few questions:1. Can I run App Installer in silent mode (without UI & User interaction) ?2. Will App Installer work when the user is not login to the store ?3. Anyone has a link to sample webpage that implements a Direct Web Install ?
    • Anonymous
      October 10, 2017
    1. The PowerShell command Add-AppxPackage can be used to silently install apps.2. The AppInstaller is for installing .appx and .appxbundles that are stored outside of the store. It does not require a user to be logged into the store.3. There is no sample site right now, but its as easy as adding the uri to your existing website that starts with 'ms-appinstaller:?source=' So for example ms-appinstaller:?source=http://contoso.azureedge.net/Sample_1.0.526.0_x64.appx
      • Anonymous
        October 10, 2017
        If I want to download from a web page a AppxBundle file that depends on two other appx file ?
        • Anonymous
          October 16, 2017
          Are the two other .appx files framework packages? If they are framework packages, during installation App Installer app will install the required frameworks automatically on the user's behalf. If they are not framework packages but are optional packages, we recommended you to use a .appinstaller file to define your set of packages that you want to deploy. Here is a blogpost which goes through the uses of .appinstaller file and here is blogpost to build your .appinstaller file.
  • Anonymous
    October 12, 2017
    Really we were waiting for this feature. I guess Microsoft soon understood that LOB developers don't want to upload their apps to Windows Store (even private store). Please share some videos and samples and fix those broken links ;) .
    • Anonymous
      October 16, 2017
      Fixed the links :) In the article, I have pasted a short HTML snippet as a sample. All you need to invoke App Installer to perform the install is the custom scheme(ms-appinstaller:?source=) in front of the URI. If the provided sample isn't sufficient, we can provide more appropriate guidance if you provide more details about your scenario.
      • Anonymous
        October 22, 2017
        I have tried the sample, I have uploaded the files but got this error: "Error in parsing the appx/appxbundle/appinstaller package."
      • Anonymous
        October 30, 2017
        I'm having the same issue.I can install the .appx and .appxbundle (s) from File Explorer.When I use the web install I get the same error: “Error in parsing the appx/appxbundle/appinstaller package.”1. Is there some permissions I have to set in the OS?2. Does the web install simply not work anymore(I don't see much documentation on it)3. Am I missing code in my Startup.cs file (asp.net core 1.x)? If so, is there a link to a sample project?
        • Anonymous
          November 01, 2017
          There are no permissions or code that you would need. Because App Installer is being invoked, you have the correct version and are using the custom scheme correctly. The error indicates that App Installer is not able to access the app package or that the app is not packaged properly. You also mention that you were able to install the app package fine from File Explorer which means that they are packaged properly. So, it is likely that App Installer is not able to access the app package from the web server. Can you confirm that you are able to access the webserver otherwise. One simple test you can perform is - Just remove the custom scheme in front of the URI and enter that in your browser address bar. If you have access to the web server, the browser should prompt you to download the app package. Let me know if this helps or if you can provide the webpage you are using to test this out, we can help troubleshoot as well.
      • Anonymous
        November 04, 2017
        Such long waiting feature needs at least one video tutorial! I haven't found enough resources in the docs.
  • Anonymous
    October 20, 2017
    This is looking very good. I am testing it now.
  • Anonymous
    October 24, 2017
    Thanks for this.I tried on windows 10 Anniversary update and when I click on the link, a message says that I need a new application. I do not understand because app-installer is already installed. I expected that App Installer will prompt to Download the package. The same link works fine with Windows Fall Creator Update
    • Anonymous
      November 01, 2017
      It looks like there was a delay in the release of the new AppInstaller on editions earlier than the Fall Creators Update. Stay tuned it should be out shortly.
  • Anonymous
    November 16, 2017
    This is a huge step forward and and great welcome for LOB UWP developers. What is a bit unclear to me, is how the certificate part is handled in this case? Will the certificate still need to be manually installed or am I missing something ?
    • Anonymous
      November 16, 2017
      You can use a certificate that is already trusted on the device or for enterprise scenarios you can push the enterprise root using tools like Intune or SCCM.