Relevance for AppxPackage

Is there an inspector that will check for an Appxpackage? I am trying to write relevance to determine if the new Outlook has been installed. I think the problem is distinguishing between the old and the new Outlook.

PS C:\windows\system32> Get-AppxPackage -AllUsers -Name *Outlook*


Name                   : Microsoft.OutlookForWindows
Publisher              : CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, 
C=US
Architecture           : X64
ResourceId             :
Version                : 1.2023.1114.100
PackageFullName        : Microsoft.OutlookForWindows_1.2023.1114.100_x64__8wekyb3d8bbwe
InstallLocation        : C:\Program 
Files\WindowsApps\Microsoft.OutlookForWindows_1.2023.1114.100_x64__8wekyb3d8bbwe

IsFramework : False
PackageFamilyName : Microsoft.OutlookForWindows_8wekyb3d8bbwe
PublisherId : 8wekyb3d8bbwe
PackageUserInformation : {S-1-5-21-2046131998-2118672207-1866013658-1021 [CORPORATE\mbartosh]: Installed}
IsResourcePackage : False
IsBundle : False
IsDevelopmentMode : False
NonRemovable : False
IsPartiallyStaged : False
SignatureKind : Developer
Status : Ok

Powershell to check for new Outlook

If ($null -eq (Get-AppxPackage -Name Microsoft.OutlookForWindows -AllUsers)) {
Write-Output 'Microsoft Outlook Preview App not present’
Exit 0
}
Else {
Write-Output 'Microsoft Outlook Preview App present’
Exit 1
}

Does this thread help? Detecting UWP apps

Q: unique values of (((select "/Package/Properties/DisplayName" of it as text) & " " & (node value of attribute "Version" of select "/Package/Identity" of it)) of xml documents of files "AppxManifest.xml" of folders whose (name of it contains "Outlook") of folder "C:\Program Files\WindowsApps")
A: Outlook for Windows 1.2023.1011.100
T: 93.282 ms
I: plural string with multiplicity
2 Likes

Yes, that does it! Thanks SLB