다음을 통해 공유


AppListEntry.AppUserModelId 속성

정의

AppListEntry에 대한 AUMID(애플리케이션 사용자 모델 ID)를 가져옵니다.

public:
 property Platform::String ^ AppUserModelId { Platform::String ^ get(); };
winrt::hstring AppUserModelId();
public string AppUserModelId { get; }
var string = appListEntry.appUserModelId;
Public ReadOnly Property AppUserModelId As String

속성 값

String

Platform::String

winrt::hstring

앱의 ID를 나타내는 문자열입니다.

Windows 요구 사항

디바이스 패밀리
Windows 10 Fall Creators Update (10.0.16299.0에서 도입되었습니다.)
API contract
Windows.Foundation.UniversalApiContract (v5.0에서 도입되었습니다.)

예제

// Find and activate the desired application (if present on this machine)
using namespace Windows.Management.Deployment;

async Task<bool> RunApplicationAsync(string aumid)
{
  var packageManager = new Windows.Management.Deployment.PackageManager();
  IEnumerable<Package> packages = packageManager.FindPackagesForUserWithPackageTypes(
      null, PackageTypes.Main | PackageTypes.Optional);

  foreach (Package package in packages)
  {
    IReadOnlyList<AppListEntry> entries = await package.GetAppListEntriesAsync();
    foreach (AppListEntry entry in entries)
    {
      if (String.Equals(entry.AppUserModelId, aumid, StringComparison.OrdinalIgnoreCase))
      {
        return await entry.LaunchAsync();
      }
    }
  }
  return false;
}

설명

AUMID는 애플리케이션을 식별하는 데 사용할 수 있는 지속 가능한 값입니다. 패키지 패밀리 이름 + PRAID(패키지 상대 애플리케이션 ID)를 기반으로 합니다.

ID Description
패키지 제품군 이름 Name + Publisher( <Identity>appxmanifest.xml에서 찾은 요소).
PRAID appxmanifest.xml찾은 IdApplication 속성입니다 (예: <Application Id="Foo"...>).

AUMID는 패키지 버전 또는 아키텍처와 독립적이므로 여러 버전 또는 플랫폼에서 앱을 식별하는 데 사용할 수 있습니다.

적용 대상