From 3f2c6c610e4db3f1da9eb6874b51449932d9461b Mon Sep 17 00:00:00 2001 From: stevealexandre Date: Thu, 8 Sep 2022 02:31:55 +0200 Subject: [PATCH] Update powershell script to add relative executable path from MS Config file --- UWPHook/Resources/GetAUMIDScript.ps1 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/UWPHook/Resources/GetAUMIDScript.ps1 b/UWPHook/Resources/GetAUMIDScript.ps1 index e03e5ab..7007252 100644 --- a/UWPHook/Resources/GetAUMIDScript.ps1 +++ b/UWPHook/Resources/GetAUMIDScript.ps1 @@ -10,6 +10,11 @@ foreach ($app in $installedapps) { $appx = Get-AppxPackageManifest $app; $name = $appx.Package.Properties.DisplayName; + $executable = (Select-Xml -Path ($app.InstallLocation + "\MicrosoftGame.Config") -XPath "/Game/ExecutableList/Executable/@Name").Node.Value + # Convert object to ensure is the String of execuble (cf Halo Master Chief Collection example below) + # mcclauncher.exe + # MCC\Binaries\Win64\MCCWinStore-Win64-Shipping.exe + if($executable -is [Object[]]) { $executable = $executable[1].ToString() } if($name -like '*DisplayName*' -or $name -like '*ms-resource*') { @@ -22,8 +27,7 @@ foreach ($app in $installedapps) $logo = $app.InstallLocation + "\" + $appx.Package.Applications.Application.VisualElements.Square150x150Logo; - $aumidList += $name + "|" + $logo + "|" + - $app.packagefamilyname + "!" + $id+ ";" + $aumidList += $name + "|" + $logo + "|" + $app.packagefamilyname + "!" + $id + "|" + $executable + ";" } } }