Jon

How to Get Windows 10 AppX Application Details

1 post in this topic

I'm writing some build scripts for a Windows 10 build. One thing I want to do is optimise the build for a business desktop. And that means removing all the "toy" Windows Store apps that are reinstalled every time a new user is logged on. Zune Music - I'm looking at you. AppX packages are staged or provisioned in the Windows 10 image, and also installed per user as required. The PowerShell CmdLets are named Get-AppXProvisionedPackage and Get-AppXPackage respectively.

To get a list of packages installed for the current user we run:

Get-AppxPackage | Format-Wide -Property Name

Here is the list returned by Windows 10 Enterprise:

Microsoft.VCLibs.140.00
Microsoft.VCLibs.140.00
Microsoft.NET.Native.Framework.1.0
Microsoft.NET.Native.Framework.1.0
Microsoft.NET.Native.Runtime.1.0
Microsoft.NET.Native.Runtime.1.0
Microsoft.Windows.CloudExperienceHost
Microsoft.AAD.BrokerPlugin
Microsoft.Windows.ShellExperienceHost
windows.immersivecontrolpanel
Microsoft.Windows.Cortana
Microsoft.AccountsControl
Microsoft.BioEnrollment
Microsoft.LockApp
Microsoft.MicrosoftEdge
Microsoft.Windows.AssignedAccessLockApp
Microsoft.Windows.ContentDeliveryManager
Microsoft.Windows.ParentalControls
Microsoft.WindowsFeedback
Microsoft.XboxGameCallableUI
Microsoft.XboxIdentityProvider
Windows.ContactSupport
Windows.MiracastView
Windows.PrintDialog
Windows.PurchaseDialog
microsoft.windowscommunicationsapps
Microsoft.BingFinance
Microsoft.BingWeather
Microsoft.BingNews
Microsoft.Getstarted
Microsoft.Windows.Photos
Microsoft.WindowsStore
Microsoft.XboxApp
Microsoft.WindowsCamera
Microsoft.ZuneMusic
windows.devicesflow
Microsoft.WindowsAlarms
Microsoft.SkypeApp
Microsoft.ZuneVideo
Microsoft.WindowsSoundRecorder
Microsoft.WindowsPhone
Microsoft.WindowsMaps
Microsoft.WindowsCalculator
Microsoft.People
Microsoft.Office.OneNote
Microsoft.MicrosoftSolitaireCollection
Microsoft.MicrosoftOfficeHub
Microsoft.BingSports
Microsoft.Appconnector
Microsoft.3DBuilder

It's interesting that some of the old desktop applications have been replaced by Universal AppX packages. For example, Windows Calculator. 

The list above just includes the AppX package name, there are more properties available:

Get-AppXPackage Microsoft.WindowsCalculator
Name              : Microsoft.WindowsCalculator
Publisher         : CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US
Architecture      : X64
ResourceId        : 
Version           : 10.1507.15010.0
PackageFullName   : Microsoft.WindowsCalculator_10.1507.15010.0_x64__8wekyb3d8bbwe
InstallLocation   : C:\Program Files\WindowsApps\Microsoft.WindowsCalculator_10.1507.15010.0_x64__8wekyb3d8bbwe
IsFramework       : False
PackageFamilyName : Microsoft.WindowsCalculator_8wekyb3d8bbwe
PublisherId       : 8wekyb3d8bbwe
IsResourcePackage : False
IsBundle          : False
IsDevelopmentMode : False
Dependencies      : {Microsoft.VCLibs.140.00_14.0.22929.0_x64__8wekyb3d8bbwe}

 

Once you have package names you can use Remove-AppXPackage to uninstall for the user, and Remove-AppXProvisionedPackage to remove from the image, then you run SysPrep and the applications will not be installed for new users of that image.

Most of the package names are fairly self explanatory, but each package can contain multiple applications. It's not obvious that the "toy" Windows Mail application is included in the microsoft.windowscommunicationsapps package. Here is a PowerShell script that cycles through all the packages and shows the applications inside:

$packages = Get-AppxPackage

foreach ( $package in $packages )
{
    Write-host "Package: $($package.Name)"
    
    $manifests = Get-AppxPackageManifest -Package $package
    foreach ($manifest in $manifests)
    {
        foreach($app in $manifest.Package.Applications.Application)
        {
            Write-Host "  Id: $($app.Id)"
            Write-Host "  Executable: $($app.Executable)"           
        }
    }

    Write-Host
}

Example output for microsoft.windowscommunicationsapps:

Package: microsoft.windowscommunicationsapps
  
  Id: microsoft.windowslive.mail
  Executable: HxMail.exe
  
  Id: microsoft.windowslive.calendar
  Executable: HxCalendarAppImm.exe

 

The Id gives you a good idea of the individual applications, but I imagine there is a way to get the proper Start Menu display name. Need to do a little more digging though.

2 people like this

Share this post


Link to post
Share on other sites



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Similar Content

    • ur
      By ur
      I am maintaining all the reusable code in a separate file as library.au3.
      In that file I have referenced some dependent files using fileinstall, so that they will be extracted when necessary.
       
      Problem is, if I use a function in the library.au3 in another script which doesn't require this dependent file, as I am including the whole file using include tag, it is embedding that file also.
      Is there any way to exclude that.
       
    • BBs19
      By BBs19
      Features:
      Create modern looking borderless and resizable GUIs with control buttons (Close,Maximize/Restore,Minimize, Fullscreen, Menu) True borderless, resizeable GUI with full support for aerosnap etc. Many color schemes/themes included. See MetroThemes.au3 for more details. 3 type of Windows 8/10 style buttons. Modern checkboxes, radios, toggles and progressbar. All buttons, checkboxes etc. have hover effects! Windows 10 style modern MsgBox. Windows 10/Android style menu that slides in from left. Windows 10 style right click menu
      Example(Image): 

      Hover effect of the control buttons:

      Windows 10-Style MsgBox:

      Windows 10/Android-Style menu:

      Credits: @UEZ, for the function to create buttons with text using GDIPlus. @binhnx for his SSCtrlHover UDF
      Version 5.0 - Changelog - 03.09.2017
      New features:
      Hover effects, minimize,maximize,restore and other GUI effects are now working natively, there is no need to call any function in a loop. This also allows the hover effects to work if the main script is paused due to "Sleep, Msgbox etc." The hover effects now work slightly faster and create less CPU usage, however the startup time of the main script is slightly increased. Thanks to @binhnx for his SSCtrlHover UDF. Maximize, Minimize, Fullscreen and Restore buttons now work natively, meaning you don't need to set actions for them manually.  If you prefer handling the buttons manually, then you can disable this by setting "$ControlBtnsAutoMode = False" Added _Metro_CreateButtonEx2 -> Creates a slightly rounded button without a frame around. Hovering changes the button color to a lighter color. Added _Metro_CreateCheckboxEx2 -> Creates a modern round checkbox. Added _Metro_CreateRadioEx -> Creates a metro style radio with colored checkmark. Added "_Metro_RightClickMenu" an easy to use rightclick menu. You can use this with listviews or anything else. Check out the example for a demo of the rightclick menu and how to implement it. -> Rightclick on Button3 to show the menu. Added multiple new themes with flat colors and updated the old themes. Check out the example for a demo with all themes by pressing the menu button -> Themes Demo Improvements:
      You can now delete all controls that have hover effects(buttons, checkboxes etc.) using GUICtrlDelete($ControlHandle). This will also automatically release all resources and remove the control from the global array. Many other optimizations,changes and bugfixes.  
      Download UDF with example:
       
       
    • VIP
      By VIP
      I can not do anything with any user in the "Local Users Group"
      I tried from my account but I could not change my password (ie set new password)!
      But I was able to activate the Administrator account and I logged into the Administrator account and still could not do anything with my account! But I can set the password and disable the Administrator account from my account or Administrator.
      Any ideas? (Ignore the click on the Sign-in option in the Change Accout settings.)
       

    • dreivilo47
      By dreivilo47
      When I want to test Example 1 of Function _IECreate (AutoIt Help File), I see that function _IECreate doesn't work in Windows 10.
      Syntax Check (Ctrl+F5) gives no errors.
       
      Example 1:
      ; Create a browser window and navigate to a website #include <IE.au3> Local $oIE = _IECreate("www.autoitscript.com")  
      The error I receive with F5 (Tools, Go) in SciTE:

    • Chaym
      By Chaym
      Does AutoIT supported  in Windows 10 OS (x64)?
      After installing AutoIT in x64 OS and recompiling code,
      I get a lot of error messages...