Getting appx displayname and excluding frameworks

This commit is contained in:
Brian Lima 2016-10-10 23:10:14 -03:00
parent 73478d218c
commit 1a4552bbef
2 changed files with 7 additions and 4 deletions

View File

@ -167,7 +167,7 @@ private void Bwr_DoWork(object sender, DoWorkEventArgs e)
//Remove end lines from the String and split both values, I split the appname and the AUMID using |
//I hope no apps have that in their name. Ever.
var valor = app.Replace("\r\n", "").Split('|');
if (!String.IsNullOrEmpty(valor[0]))
if (!String.IsNullOrWhiteSpace(valor[0]) && !valor[0].Contains("ms-resource"))
{
Application.Current.Dispatcher.BeginInvoke((Action)delegate ()
{

View File

@ -4,9 +4,12 @@ $aumidList = @()
foreach ($app in $installedapps)
{
try {
foreach ($id in (Get-AppxPackageManifest $app).package.applications.application.id)
foreach ($appx in (Get-AppxPackageManifest $app))
{
$aumidList += $app.name + "|" + $app.packagefamilyname + "!" + $id + ";"
$aumidList += $appx.Package.Applications.Application.VisualElements.DisplayName + " | "+
$app.packagefamilyname + "!" + $appx.package.applications.application.id + ";"
}
} catch {
$ErrorMessage = $_.Exception.Message
@ -14,4 +17,4 @@ foreach ($app in $installedapps)
}
}
$aumidList
$aumidList;