How to install Windows Store Apps for All User on a Device
In order to install the apps, we need to download the required files to an offline location. Many apps available in the Windows Store require dependency packages in order to install and run properly. We will also need to download these dependencies to the same offline location.
Step 1 – Remove Metro Apps
Removing the currently installed and provision packages is a good idea when you are building a reference machine and would like the image as clean as possible. Also, by removing all the existing apps, you also remove the dependencies along with them. This way when we click “Install” in the Windows Store, we will pull the required dependencies for that particular app and re-install what we just removed. The idea here is to have the Windows Store request all the installers it needs then we will be able to see where to get the files from.
In an elevated Powershell prompt, run:
Get-AppxPackage | Remove-AppxPackage
Don’t worry about the errors. Some built-in apps cannot be removed
Step 2 – Download and Run Wireshark
Go to Wireshark.com to download. Install Wireshark with the defaults and launch it.
Choose the correct interface and click “Start”
Step 3 – Launch the Windows Store then search for your app and click Install
In order to get the .appx files required to perform the sideload, we need to first install the app(s) from the Windows Store which requires a Microsoft Account. When you click “Install” for your app, you will be prompted to switch to a Microsoft Account if you have not done so already.
Step 4 – Switch back to Wireshark and download the .appx files
With your app installing, now switch back to Wireshark.
Filter the capture with:
(http.request.method == "GET") && (http.request.full_uri matches ".appx")
Click on each of the packets and look at the lower pane in Wireshark for the “Full Request URI”
Double click on the URI or copy/paste into a web browser to download the files. Note that there will be multiple packets with the same URI. We just need the first occurrence of each unique URI.
In this example there are four unique URI’s that I will download.
Step 5 – Identify and Rename
To identify and rename the packages, open each zip file and look in the AppxManifest.xml for the package name. If it is an Appxbundle, look in the AppxMetadata folder for the AppxBundleManifest.xml
In order to make sure we caught all of the URI’s when the app installed, we can check the dependencies within Powershell.
Get-AppxPackage | fl Name,Dependencies
Great! We now have all of the appx files needed to do an offline install and also to provision for all new users.
Note: You can also get VCLibs .appx from http://go.microsoft.com/fwlink/?LinkId=511069
If you install Visual Studio Express, you can get access to more appx dependencies.
Download Visual Studio Express 2013 from http://go.microsoft.com/fwlink/?LinkId=396853
Look in the following paths after you install Visual Studio:
\Program Files (x86)\Microsoft SDKs\Windows\v8.1\ExtensionSDKs\Microsoft.WinJS.2.0\1.0\
\Program Files (x86)\Microsoft SDKs\Windows\v8.1\ExtensionSDKs\Microsoft.VCLibs\12.0\AppX\Retail\
Step 6 – Add Registry Keys to allow for Sideloading
Windows Registry Editor Version 5.00
Step 7 – Sideload your App!!
In an elevated Powershell prompt, run:
Add-AppxProvisionedPackage -Online -PackagePath mail.appxbundle -DependencyPath VClibsx64.appx,VClibsx86.appx,WinJS.appx -SkipLicense
Take note that I’ve shortened the package names for simplicity
When a new user logs in, they will have the app automatically install during the “Installing your Apps” phase of the login animation screen.
BONUS – Provision Windows Store Apps in SCCM Task Sequence
Well this is easy enough since the hard part is done.
Build a package with all the required .appx files and with a powershell script that runs the above command.
Add a “Run PowerShell Script” step to your Task Sequence like so:
That’s all there is to it!