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]大型アップデートをサイレントインストールする方法

    下記記事で紹介しているように、Windows 10では「Windows…

  2. Windows 10

    「ファイル名を指定して実行」からMicrosoft Edgeを起動する

    以前書いた記事で、Microsoft EdgeをVBScriptから起…

  3. Windows 10

    WinAppDriver UI Recorderを試してみました。

    下記記事にある通り、「WinAppDriver UI Recorder…

  4. Office関連

    Windows 10 Technical PreviewにOffice XPをインストールしてみまし…

    「最新ビルドを詳細レビュー! Windows 10 Technical…

  5. Windows 10

    Microsoft Edgeのお気に入りをHTML形式でインポート・エクスポートする。

    以前当ブログでMicrosoft Edgeのお気に入りを編集する方法に…

  6. Windows関連

    特殊フォルダーのパスを取得するVBScript

    ファイルのコピーや移動を行う場合に特殊フォルダーのパスが必要になること…

コメント

  • コメント (0)

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

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

Time limit is exhausted. Please reload CAPTCHA.

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

Translate

最近の記事

アーカイブ

PAGE TOP