Microsoft App Commerce Client and REST APIs |
Client API Available | REST API Available | Client API Documentation | REST API Documentation |
---|---|---|---|---|
Inventory | ||||
Query All Available Products for App |
Yes | No | Get product info for apps and add-ons - UWP applications |
NA |
Query Products Owned by User (Durables,Consumables) | Yes | Yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:checkPrivileges | |
NET FILE 1>NUL 2>NUL | |
if '%errorlevel%' == '0' ( goto continue | |
) else ( powershell "saps -filepath %0 -verb runas" >nul 2>&1) | |
exit /b | |
:continue | |
cd %~dp0 | |
powershell Set-ExecutionPolicy bypass -force | |
powershell -f setpath.ps1 | |
powershell Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
function saveBlob (blob, fileName) { | |
var a = document.createElement("a"); | |
document.body.appendChild(a); | |
a.style = "display: none"; | |
var url = window.URL.createObjectURL(blob); | |
a.href = url; | |
a.download = fileName; | |
a.click(); | |
window.URL.revokeObjectURL(url); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Companion to: https://blog.mjfnet.com/2019/11/15/How-to-detect-if-a-Microsoft-Store-app-is-Installed/ | |
public static bool IsAppAlreadyInstalled(string FullPackageFamilyName) | |
{ | |
var oPkgManager = new PackageManager(); | |
bool result = false; | |
try | |
{ | |
//If 1st parameter is string.Empty, the packages are retrieved for the current user. | |
Package oPkg = oPkgManager.FindPackageForUser(string.Empty, FullPackageFamilyName); | |
result = oPkg != null; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
/** | |
In EdgeHTML / PWA downloading content by creating a download link on the fly and calling Click (traditional method) does not work. | |
TL;DR: See below for an implementation of the file download for EdgeHTML / PWA. | |
Longer explanation: | |
When running with the Spartan WebView as a HWA (Hosted Web App) or PWA MS Store, you’re running inside a UWP container with the associated security restriction. This has 2 implications: | |
• msSaveOrOpenBlob is not defined in this execution context for security reasons | |
• you can’t download directly a file on the file system using the a.download + a.click approach |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Extensions> | |
<desktop6:Extension Category="windows.service" EntryPoint="Windows.FullTrustApplication" Executable="WindowsServiceSample.exe"> | |
<desktop6:Service Name="WindowsService Sample" StartAccount="localSystem" StartupType="auto" /> | |
</desktop6:Extension> | |
</Extensions> | |
<Capabilities> | |
<rescap:Capability Name="runFullTrust"/> | |
<rescap:Capability Name="localSystemServices"/> | |
<rescap:CapabiIity Name="packagedServices"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.UI.Xaml; | |
using System; | |
using System.Runtime.InteropServices; | |
using Windows.Services.Store; | |
using WinRT; | |
// To learn more about WinUI, the WinUI project structure, | |
// and more about our project templates, see: http://aka.ms/winui-project-info. | |
namespace App12Reunion |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Param( | |
[Parameter(Mandatory=$true)] | |
$VMName, | |
[Parameter(Mandatory=$true)] | |
$Memory, | |
[Parameter(Mandatory=$true)] | |
$NewVHD, | |
[Parameter(Mandatory=$true)] | |
$VHDSize, | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Extensions> | |
<uap:Extension Category="windows.fileTypeAssociation"> | |
<uap:FileTypeAssociation Name="wpfmsix"> | |
<uap:SupportedFileTypes> | |
<uap:FileType>.zip</uap:FileType> | |
</uap:SupportedFileTypes> | |
<uap:DisplayName>WPF MSIX Detect</uap:DisplayName> | |
<uap:Logo>logoImage.png</uap:Logo> | |
<uap:InfoTip>Detect MSIX Container</uap:InfoTip> | |
</uap:FileTypeAssociation> |
Question: How can we install our UWP app with the required dependencies without an internet connection?
Answer: Per the question, if you are connected to the internet, the app dependencies as defined in manifest will be downloaded and installed from the Store. Typically, the dependencies list in the manifest looks like this: To install the dependencies without a connection to the internet, you must create the packages for sideloading. (In Visual Studio, Publish, Create App
OlderNewer