Windows 10

「microsoft-edge:」って何?

以前書いた「Microsoft EdgeでWebページを開くインターネットショートカット」や「Microsoft Edgeを起動するVBScript」で紹介している、Microsoft Edgeを起動するための文字列「microsoft-edge:」、これは一体何なのか調べてみました。

Microsoft Edgeのマニフェストファイル

上記文字列を調べるに当たり、Edgeの設定等が書かれたマニフェストファイル(C:\Windows\SystemApps\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\AppxManifest.xml)を開いたところ、下記(一部抜粋)のようになっていました。

<?xml version="1.0" encoding="utf-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" xmlns:wincap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/windowscapabilities" xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities" IgnorableNamespaces="uap mp wincap rescap">
  <Identity Name="Microsoft.MicrosoftEdge" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" Version="20.10240.16384.0" ProcessorArchitecture="neutral" />
  <mp:PhoneIdentity PhoneProductId="395589fb-5884-4709-b9df-f7d558663ffd" PhonePublisherId="95d94207-0c7c-47ed-82db-d75c81153c35" />
  <Properties>
    <DisplayName>ms-resource:AppName</DisplayName>
    <PublisherDisplayName>Microsoft Corporation</PublisherDisplayName>
    <Logo>Assets\MicrosoftEdgeSquare50x50.png</Logo>
  </Properties>
  <Dependencies>
    <TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.10100.0" MaxVersionTested="10.0.10100.0" />
  </Dependencies>
  <Resources>
    <Resource Language="en-US" />
  </Resources>
  <Applications>
    <Application Id="MicrosoftEdge" Executable="MicrosoftEdge.exe" EntryPoint="MicrosoftEdge.App">
      <uap:VisualElements DisplayName="ms-resource:AppName" Square150x150Logo="Assets\MicrosoftEdgeSquare150x150.png" Square44x44Logo="Assets\MicrosoftEdgeSquare44x44.png" Description="ms-resource:AppDescription" BackgroundColor="#0078D7">
        <uap:DefaultTile ShortName="ms-resource:AppName" Square310x310Logo="Assets\MicrosoftEdgeSquare310x310.png" Wide310x150Logo="Assets\MicrosoftEdgeWide310x150.png" Square71x71Logo="Assets\MicrosoftEdgeSquare71x71.png">
          <uap:ShowNameOnTiles>
            <uap:ShowOn Tile="square150x150Logo" />
            <uap:ShowOn Tile="wide310x150Logo" />
            <uap:ShowOn Tile="square310x310Logo" />
          </uap:ShowNameOnTiles>
        </uap:DefaultTile>
        <uap:SplashScreen Image="Assets\MicrosoftEdgeSplashScreen620x300.png" BackgroundColor="#0078D7" />
      </uap:VisualElements>
      <Extensions>
        <uap:Extension Category="windows.protocol">
          <uap:Protocol Name="http" />
        </uap:Extension>
        <uap:Extension Category="windows.protocol">
          <uap:Protocol Name="https" />
        </uap:Extension>
        <uap:Extension Category="windows.protocol">
          <uap:Protocol Name="read" />
        </uap:Extension>
        <uap:Extension Category="windows.protocol">
          <uap:Protocol Name="microsoft-edge" />
        </uap:Extension>
        <uap:Extension Category="windows.fileTypeAssociation">
          <uap:FileTypeAssociation Name="html">
            <uap:SupportedFileTypes>
              <uap:FileType ContentType="text/html">.htm</uap:FileType>
              <uap:FileType ContentType="text/html">.html</uap:FileType>
            </uap:SupportedFileTypes>
            <uap:Logo>Assets\MicrosoftEdgeFile.png</uap:Logo>
          </uap:FileTypeAssociation>
        </uap:Extension>
        <uap:Extension Category="windows.fileTypeAssociation">
          <uap:FileTypeAssociation Name="pdf">
            <uap:SupportedFileTypes>
              <uap:FileType ContentType="application/pdf">.pdf</uap:FileType>
            </uap:SupportedFileTypes>
            <uap:Logo>Assets\MicrosoftEdgePDF.png</uap:Logo>
          </uap:FileTypeAssociation>
        </uap:Extension>
        <uap:Extension Category="windows.appService" EntryPoint="SpModel.Model.RetailDemoTask">
          <uap:AppService Name="Microsoft-RetailDemo-Provision" />
        </uap:Extension>
      </Extensions>
    </Application>
  </Applications>
…

これを見ると答えがズバリ書いてありますね。

<uap:Extension Category="windows.protocol">
  <uap:Protocol Name="microsoft-edge" />
</uap:Extension>

uap:Protocol要素の説明にある通り、アプリに関連付けられたURIスキームです。

Universal Windows Platform (UWP)アプリの開発には明るくないのですが、「Handle URI activation」を見る限り、マニフェストで設定しておけば“bingmaps:”のように指定したURIとアプリを結びつけることができるみたいですね。
これはなかなか便利だと思います。

ちなみに「Reserved file and URI scheme names」には、すでに予約されていて勝手に使うことのできないURIスキーム名が載っています。

逆に、これらのスキームを使うとWindowsの設定などが呼び出せるので、覚えておいても損は無さそうですね!

関連記事

続・起動中のMicrosoft EdgeからタイトルとURLを取得するC#コード(UI Automation編)前のページ

Microsoft Edgeを起動するC#コード次のページ

関連記事

  1. Windows 10

    [Windows 10]「WebとWindowsを検索」を消す方法

    Windows 10を使ってみて真っ先に思ったことが、タスクバーに表示…

  2. Windows 10

    Windows Insider Meetup in Japan 2019 東京に参加しました。

    Windows Insider向けのミートアップイベント「Window…

  3. Windows関連

    [Windows 8.1]VB5CCEをインストールしてみました。

    ※ 下記はWindows 8.1 RTM(日本語版・32ビット)に基づ…

  4. Windows 10

    特殊フォルダやプログラムのCLSID一覧とShellコマンド一覧

    「「プログラムと機能」からインストールされているアプリケーションの一覧…

  5. Windows 10

    Microsoft Update カタログから累積更新プログラムをダウンロードするVBScript

    「累積更新プログラム」とは、その名の通りOSを最新の状態に保つための更…

  6. Windows 10

    Windows 10に昔のソフトを入れてみました(2)

    2年近く前に書いた下記記事の続編です。32ビット版Wi…

コメント

  • コメント (0)

  • トラックバックは利用できません。

  1. この記事へのコメントはありません。

Time limit is exhausted. Please reload CAPTCHA.

※本ページはプロモーションが含まれています。

Translate

最近の記事

アーカイブ

PAGE TOP