1

MSIX and AppX-packaged apps installed to %SystemDrive%\Program Files\WindowsApps. These applications differ to standard applications. Some examples are Mail, Weather, and Calculator.

To start them, you use a URI schema. For example, to start Calculator, you type calculator://. I want to invoke Quick Assist like calculator://, but Quick-Assist:// doesn't work. Any ideas?

iforti
  • 11

5 Answers5

2
@For /f "tokens=1* delims=" %%A in ('reg query HKCR /f "URL:*" /s /d ^| findstr /c:"URL:" ^| findstr /v /c:"URL: " ^| Sort') Do @Echo %%A %%B
pause

If typing the above command, rather than in a batch file, change %%A to %A and %%B to %B

will list all protocol handlers. It takes a while to run.

From the list ms-quick-assist and you add :// to it so ms-quick-assist://.

2

Are you saying, you are doing this:

Start-Process -FilePath 'calculator://'

You cannot have spaces in a Url/URI. The above works because it's a Windows App.

However, 'Quick Assist' is an executable, located here:

%windir%\system32\quickassist.exe

So, just type quickassist at cmd.exe shell or Powershell shell to launch it.

postanote
  • 5,136
0

You start Calculator in Windows Explorer by type calculator:// as you noted. That works.

There is a Quick Assist application but it, but as installed does not open like Calculator in Windows Explorer.

It will start the way any Windows App starts. So it does run.

You can get a Quick Assist app in the Microsoft Store to work like you wish. In Explorer, type quickassist:// (no spaces or dashes) and it will lead you there.

0

URIs

  1. Acquisition

    As Microsoft Docs' Handle URI activation documentation explains, applications register arbitrary URI schemas with the OS at their discretion, and the standard default association handling is applied when conflicts arise. Consequently, there is no guarantee that an application, UWP or otherwise, shall register a schema.

    Ultimately, this information should be centrally stored by the OS. However, I don't know where specifically, although I expect as an array of DWORD values to a key in the Registry. Irrespective, you can utilize this SO answer to acquire a comprehensive list of locally registered schemas.

  2. Invocation

    To invoke these schemas as URIs, adhere to the undermentioned syntax:

    Start-Process -FilePath 'Calculator://'
    

    Note that the -FilePath argument is utilized despite a URI and filepath fundamentally differing. This is merely a vestigate of Start-Process's architecture.

Paths

  1. Invocation

    Alternatively, because your question appears to be an example of an X/Y problem, for applications which do not register schemas, utilize the undermentioned syntax:

    Start-Process -FilePath '%WinDir%\System32\QuickAssist.exe'
    
  2. Acquisition

      • Start Menu

        1. Secondary-press/click on a shortcut (.lnk file) to invoke a context menu.
        2. Select "Properties".
        3. If the shortcut doesn't link to an application installed using an MSIX, MSIXBundle, or APPX package, you shall be provided with a path which you can duplicate to your clipboard.
      • Estimation

        Alternatively, try estimating it in a shell which utilizes $Env:PATH.

    1. You now know the .exe file's name, so you can acquire its path using Get-Command, as the undermentioned command demonstrates:

      Get-Command 'QuickAssist.exe'
      
0

I wrote a function called Get-ProgramUwp for retreiving informations from UWP app (app sanboxed, from Windows store), like URI schemes and Shell Namespace Identifier, in order to easily start an app with it's name :

function Get-ProgramUwp {
    [CmdletBinding()]  
    param (
        [Parameter(Mandatory=$False, ValueFromPipeline=$true)]
        [string]$Name = "*"
    )
Write-Verbose "Getting UWP app informations (Universal Windows Platform app)"
# Retrieve all UWP apps matching the name (wildcard support)
$packages = Get-AppxPackage $Name

if ($packages.Count -eq 0) {
    Write-Verbose "No package found matching '$Name' (Universal Windows Platform (UWP) app)"
    return
}

# Prepare output array
$ProgramUwpArray = @()

foreach ($package in $packages) {
    Write-Verbose "> Processing package: '$($package.PackageFullName)'"

    # Define path to AppxManifest.xml
    $manifestPath = Join-Path $package.InstallLocation "AppxManifest.xml"

    if (-Not (Test-Path $manifestPath)) {
        Write-Verbose "  Manifest not found for package '$($package.Name)'"
        continue
    } else {
        Write-Verbose "  Manifest found for package: '$manifestPath'"
    }

    # Load the manifest XML, handling namespaces
    try {
        [xml]$manifest = Get-Content -Path $manifestPath
        $namespaceManager = New-Object System.Xml.XmlNamespaceManager($manifest.NameTable)
        $namespaceManager.AddNamespace('def', $manifest.DocumentElement.NamespaceURI)
        $namespaceManager.AddNamespace('uap', 'http://schemas.microsoft.com/appx/manifest/uap/windows10')
        $namespaceManager.AddNamespace('uap3', 'http://schemas.microsoft.com/appx/manifest/uap/windows10/3')
    } catch {
        Write-Verbose "  Failed to load manifest for package: $($package.Name)"
        continue
    }

    # Extract the Application Name (DisplayName from manifest, or fallback to package name)
    $appDisplayName = $manifest.SelectSingleNode('//def:DisplayName', $namespaceManager).InnerText
    if (-not $appDisplayName) {
        Write-Verbose "  No DisplayName found in manifest, using package name: $($package.Name)"
        $appDisplayName = $package.Name
    }

    # Extract the Application Publisher from manifest
    $appPublisherDisplayName = $manifest.SelectSingleNode('//def:PublisherDisplayName', $namespaceManager).InnerText

    # Extract Application ID and EntryPoint (with proper namespace handling)
    $applicationNode = $manifest.SelectSingleNode('//def:Applications/def:Application', $namespaceManager)
    if ($applicationNode) {
        $appId      = $applicationNode.GetAttribute("Id")
        $appExecutable = $applicationNode.GetAttribute("Executable")
        $appEntryPoint = $applicationNode.GetAttribute("EntryPoint")
    }

    # Extract the Application Description from manifest
    $VisualElementsNode = $manifest.SelectSingleNode('//uap:VisualElements', $namespaceManager)
    if ($VisualElementsNode) { $Description = $VisualElementsNode.GetAttribute("Description") }

    # Extract all registered URI schemes with their parameters (from both uap and uap3 namespaces)
    $uriSchemes = @()
    $protocolNodes = $manifest.SelectNodes('//uap:Extension[@Category="windows.protocol"]/uap:Protocol', $namespaceManager) +
                     $manifest.SelectNodes('//uap3:Extension[@Category="windows.protocol"]/uap3:Protocol', $namespaceManager)
    if ($protocolNodes) {
        foreach ($protocolNode in $protocolNodes) {
            $uriSchemeName          = $protocolNode.GetAttribute("Name")
            $uriSchemeParameters    = $protocolNode.GetAttribute("Parameters")

            # Add each protocol as a PSCustomObject with Name and Parameters
            if ($uriSchemeName) {
                $uriSchemes += [PSCustomObject]@{
                    Name       = $uriSchemeName
                    Parameters = $uriSchemeParameters
                }
            }
        }
    }

    # Construct the Shell Namespace Identifier to launch the app
    $ShellNamespaceIdentifier = "appsFolder\$($package.PackageFamilyName)!$appId"

    # Create a PSCustomObject to hold the output data, including URI schemes and command-line parameters
    $ProgramUwp = [PSCustomObject]@{
        DisplayName                 = $appDisplayName
        Publisher                   = $appPublisherDisplayName
        Version                     = $package.Version
        Architecture                = $package.Architecture
        Description                 = $Description
        AppId                       = $appId
        Executable                  = $appExecutable
        EntryPoint                  = $appEntryPoint
        ShellNamespaceIdentifier    = $ShellNamespaceIdentifier
        UriSchemes                  = $uriSchemes
    }
    $ProgramUwpArray += $ProgramUwp
}
$ProgramUwpArray

}

Here is an example of use for QuickAssist :

> Get-ProgramUWP *quickassist*

DisplayName : ms-resource://MicrosoftCorporationII.QuickAssist/resources/APP_WINDOW_NAME Publisher : Microsoft Corp. Version : 2.0.32.0 Architecture : X64 Description : ms-resource://MicrosoftCorporationII.QuickAssist/resources/APP_WINDOW_NAME AppId : App Executable : Microsoft.RemoteAssistance.QuickAssist\QuickAssist.exe EntryPoint : Windows.FullTrustApplication ShellNamespaceIdentifier : appsFolder\MicrosoftCorporationII.QuickAssist_8wekyb3d8bbwe!App UriSchemes : {@{Name=ms-quick-assist; Parameters=%1; EntryPoint=}}

Notice that QuickAssist can be launch with it's NameSpace Identifier with this command :

explorer shell:appsFolder\MicrosoftCorporationII.QuickAssist_8wekyb3d8bbwe!App

or simply :

explorer shell:$((Get-ProgramUWP *quick*assist*).ShellNamespaceIdentifier)

To be sure that function find an app by it's name, surround the name and replace spaces with the generic character "*".

The same example with the first URI scheme:

explorer $((Get-ProgramUWP *quick*assist*).UriSchemes[0].Name:$aParameter)

Hope this help

DjiPih
  • 11