mirror of https://github.com/BrianLima/UWPHook
Many improvements on detecting apps
Detecting better which name is the real name of the app. Detecting if a installed appx is framework properly and excluding it from the list. Detecting appx bundles and properly listing individual entries. Detecting icons to useUWPTest
parent
760bdee879
commit
145a77d766
@ -1,20 +1,37 @@
|
|||||||
$installedapps = get-AppxPackage
|
$installedapps = get-AppxPackage
|
||||||
|
$invalidNames = '*ms-resource*', '*DisplayName*'
|
||||||
$aumidList = @()
|
$aumidList = @()
|
||||||
|
|
||||||
foreach ($app in $installedapps)
|
foreach ($app in $installedapps)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
foreach ($appx in (Get-AppxPackageManifest $app))
|
if(-not $app.IsFramework){
|
||||||
|
foreach ($id in (Get-AppxPackageManifest $app).package.applications.application.id)
|
||||||
|
{
|
||||||
|
$appx = Get-AppxPackageManifest $app;
|
||||||
|
$name = $appx.Package.Properties.DisplayName;
|
||||||
|
|
||||||
|
if($name -like '*DisplayName*' -or $name -like '*ms-resource*')
|
||||||
|
{
|
||||||
|
$name = $appx.Package.Applications.Application.VisualElements.DisplayName;
|
||||||
|
}
|
||||||
|
if($name -like '*DisplayName*' -or $name -like '*ms-resource*')
|
||||||
|
{
|
||||||
|
$name = "App name not found, double click here to edit it";
|
||||||
|
}
|
||||||
|
|
||||||
|
$logo = $app.InstallLocation + "\" + $appx.Package.Applications.Application.VisualElements.Square150x150Logo;
|
||||||
|
|
||||||
|
$aumidList += $name + "|" + $logo + "|" +
|
||||||
|
$app.packagefamilyname + "!" + $id+ ";"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch
|
||||||
{
|
{
|
||||||
|
$ErrorMessage = $_.Exception.Message
|
||||||
$aumidList += $appx.Package.Properties.DisplayName + " | "+
|
$FailedItem = $_.Exception.ItemName
|
||||||
$app.packagefamilyname + "!" + $appx.package.applications.application.id + ";"
|
|
||||||
|
|
||||||
}
|
}
|
||||||
} catch {
|
|
||||||
$ErrorMessage = $_.Exception.Message
|
|
||||||
$FailedItem = $_.Exception.ItemName
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$aumidList;
|
$aumidList;
|
Loading…
Reference in New Issue