Condividi tramite


WEMSAL_AppXInformation (Industry 8.1)

7/8/2014

Review the syntax, members, and examples of the WEMSAL_AppXInformation WMI provider class for Windows Embedded 8.1 Industry (Industry 8.1).

This Windows Management Instrumentation (WMI) provider class contains information about all Windows Store apps installed on a device. You can use this class to find the Application User Model ID (AUMID) of any installed Windows Store app on the device, and then use the AUMID to configure Windows 8 Application Launcher to launch the app.

Syntax

class WEMSAL_AppXInformation {
 [read, key] string AppUserModelId;
 [read] string Name;
 [read] string Publisher;
 [read] string ResourceId;
 [read] string Version;
 [read] string PackageFullName;
 [read] string InstallLocation;
 [read] boolean IsFramework;
 [read] string PackageFamilyName;
 [read] string PublisherId;
 [read] string Architecture;
};

Members

The following tables list any methods and properties that belong to this class.

Methods

This class contains no methods.

Properties

Property

Data type

Qualifiers

Description

AppUserModelId

string

[read, key]

Indicates the AUMID of the Windows Store app package. You can use this value to configure Windows 8 Application Launcher.

Name

string

[read]

Indicates the name of the installed package. For example, "myCompany.mySuite.myApp".

Publisher

string

[read]

Indicates the publisher of the installed package.

ResourceId

string

[read]

Indicates the resource ID of the package.

Version

string

[read]

Indicates the version number of the package. For example, “1.0.0.0”.

PackageFullName

string

[read]

Indicates the full name of the package. The full name consists of the name, the version, the architecture, and the publisher ID.

InstallLocation

string

[read]

Indicates the installed location of the package.

IsFramework

string

[read]

Indicates if other packages can declare a dependency on this package.

PackageFamilyName

string

[read]

Indicates the family name of the package. The family name consists of the name and the publisher ID of the package.

PublisherId

string

[read]

Indicates the publisher ID of the package.

Architecture

string

[read]

Indicates the processor architecture for which the package was created. For example, “x86”.

Remarks

You must use an administrator account to access this class.

This class does not return information about web browsers that are installed on the device. The AUMID value for the default browser on the device is stored in the registry key HKEY_CURRENT_USER\Software\Classes\ActivatableClasses\Package\DefaultBrowser_NOPUBLISHERID\Server\DefaultBrowserServer\AppUserModelId.

For example, if Internet Explorer 10 is the default browser, the AUMID value is DefaultBrowser_NOPUBLISHERID!Microsoft.InternetExplorer.Default.

Example

The following sample Windows PowerShell script uses this class to find the AUMID of an installed Windows Store app based on the name of the application and the name of the company that created the app. The script then uses the AUMID to configure the global settings for Windows 8 Application Launcher by using the WEMSAL_GlobalSetting WMI class.

$COMPUTER = "localhost"
$NAMESPACE = "root\standardcimv2\embedded"

# Define common parameters.

$CommonParams = @{"namespace"=$NAMESPACE; "computer"=$COMPUTER}

# Use the company name and application name to query the installed apps for the app ID.
# Replace MyCompany and MyApp with the correct values for your Windows 8 app.

$CompanyName = "CN=MyCompany *"
$AppName = "*MyApp*"

$InstalledApps = get-wmiobject -class WEMSAL_AppXInformation @CommonParams |
 where {$_.publisher -like $CompanyName -and $_.name -like $AppName}

# Make sure we found only one matching Windows 8 app.

$ResultMeasure = $InstalledApps | Measure-Object

if ($ResultMeasure.Count -eq 1) {

# Use the WEMSAL_GlobalSetting WMI class to configure the global settings for Windows 8 Application Launcher.

set-wmiinstance -class WEMSAL_GlobalSetting @CommonParams -argument @{
AppUserModelId = $installedApps.AppUserModelId;
DefaultReturnCodeAction = 0} | Out-Null
        
# Display the updated settings.

    get-wmiobject -class WEMSAL_GlobalSetting @CommonParams | 
    format-list AppUserModelId, DefaultReturnCodeAction, 
        CustomReturnCodes, CustomReturnCodesAction
    
    Write-Host "Successfully configured global settings for Windows 8 Application Launcher"

} elseif ($ResultMeasure.Count -eq 0) {

Write-host "Could not configure Global Setting: No matching Windows 8 app was found."

} else {

write-host "Could not configure Global Setting: Multiple matching results found:"

$installedApps | format-list Publisher, Name, Version, AppUserModelId
}

See Also

Concepts

Windows 8 Application Launcher WMI provider reference
Windows 8 Application Launcher