Application of the Week – Windows Calculator (Part 1)

Application of the week > Application of the Week – Windows Calculator (Part 1)

We get many questions about how to launch provisioned ‘Universal Windows Platform apps‘ from within Liquit Workspace. For this blog I’ve selected one of the most popular ones: Windows Calculator.

Windows Calculator is a powerful calculator created as a Universal Windows Platform app. You may remember the term Windows Store app or metro style app which both go back to Windows 8 when Microsoft started with this app technology.

The Universal Windows Platform uses the same basis of technology that was developed for the Windows 8 Store apps. This includes Appx packaging with manifests, the App Container security context, CoreWindow presentation model, XAML, XAML+DirectX, DirectX etc.

UWP apps are designed to work across platforms and can be installed on multiple platforms including Windows client, Windows Phone, and Xbox. All UWP apps are also Windows apps, but not all Windows apps are UWP apps.

When you look under Apps & Features, you will find both Windows apps and Win32 apps:

Programs and Features is where we can find Windows desktop applications aka “Win32” apps only:

Appx is then Microsoft’s file format used to distribute and install these apps on the Universal Windows Platform. Appx is a .zip based contained file containing the app’s payload files plus info needed to validate, deploy, manage, and update the app. Don’t worry, I will get back to MSIX later this year too 🙂

Some Windows apps are already provisioned in Windows 10 by default. Here’s a list of the provisioned Windows apps in Windows 10 versions 1703, 1709, 1803 and 1809 including Microsoft Windows Calculator.

This means you don’t have to go to the Microsoft Store to download, install and run it. It’s already available after you’ve installed Windows 10. Let’s use some PowerShell magic to find all details about Calculator needed to create a Launch Package in Liquit Workspace.

Get-AppxPackage is the PowerShell cmdlet which lists all available Appx packages installed in a user profile:

Get-AppxPackage

We can tweak this one a bit further to list information about the calculator Appxpackage only:

Get-AppxPackage | Where {$_.Name -match 'Calculator'}

We’re going to have a look at three properties here: Name, InstallLocation and PackageFamilyName:

Name is something we need to make certain, looking at the Provisioned list, that we are looking at the details of the correct app; the ‘Windows Calculator’ app.

InstallLocation is where we can find the AppxManifest.xml file which contains the info the system needs to deploy, display, or update this Windows app:

Within this AppManifest.xml we can find the Id of the app which is this case is ‘App’:

PackageFamilyName is what we need to tell explorer.exe to launch the ‘Windows Calculator app’. In order to launch Calculator using explorer.exe succesfully, we need to add the string ‘!App’ which is the ‘Id’ value found in the AppxManifest.xml.

We can now bring this all together and create this Package in Liquit Workspace:

In the main screen:

  • Click ‘Packages
  • Click ‘Add
  • Select ‘Local application
  • Use ‘${windir}\explorer.exe‘ for ‘Process’
  • Use ‘shell:Appsfolder\Microsoft.WindowsCalculator_8wekyb3d8bbwe!App‘ for ‘Arguments’
  • In the Details screen use ‘Windows Calculator‘ for ‘Name’
  • For a suitable Icon browse to the InstallLocation value which for Windows Calculator is
    C:\Program Files\WindowsApps\Microsoft.WindowsCalculator_10.1910.0.0_x64__8wekyb3d8bbwe. Then go into ‘Assets’ to find a suitable icon. I recommended filtering the list for *256* in order to list the .png’s of the highest available resolutions.
  • Click ‘Next
  • Click ‘Finish
  • Click Entitlements and add the users you want to assign this package to.

Next week in ‘Part 2’ of this blog I will discuss how to create a PowerShell script to create this ‘Windows Calculator’ package using the ‘Liquit PowerShell Module‘.

NB. Thanks to Michael van Kleeff of IT-Value for the nice discussion about the Microsoft Store and providing me input and the inspiration to write this blog!

About the author