potisanのプログラミングメモ

趣味のプログラマーがプログラミング関係で気になったことや調べたことをいつでも忘れられるようにメモするブログです。はてなブログ無料版なので記事の上の方はたぶん広告です。記事中にも広告挿入されるみたいです。

URL Protocol値を持つProgIDキーエントリの一覧抜粋

Windows 10環境でURL Protocol値を持つProgIDキーエントリの一覧抜粋と列挙用のコードです。意外と多くのProgIDが登録されていました。

iTunes関係は多いので削除しています。Acrobat、Office、Kindlexbox(プリインストール)、Skype、OneDrive、GitHubFirefoxThunderbird関係は残しています。

ProgID 概要
acrobat URL:Acrobat Protocol
bingfinance URL:bingfinance
bingfoodanddrink URL:bingfoodanddrink
binghealthnfitness URL:binghealthnfitness
bingmaps URL:bingmaps
bingmoney URL:bingmoney
bingnews URL:bingnews
bingsports URL:bingsports
bingtravel URL:bingtravel
bingweather URL:bingweather
calculator URL:calculator
callto URL:CallTo Protocol
com.microsoft.3dviewer URL:com.microsoft.3dviewer
com.microsoft.builder3d URL:com.microsoft.builder3d
com.microsoft.print3d URL:com.microsoft.print3d
diagnosticdataviewer URL:diagnosticdataviewer
dropbox-client URL:dropbox-client protocol
dropbox-install URL:dropbox-install protocol
evernote Evernote プロトコル
Explorer.AssocActionId.BurnSelection
Explorer.AssocActionId.EraseDisc
Explorer.AssocActionId.ZipSelection
Explorer.AssocProtocol.search-ms Windows Search Protocol
Explorer.BurnSelection File Explorer ‘Burn to disc’ button
Explorer.EraseDisc File Explorer ‘Erase this disc’ button
Explorer.ZipSelection File Explorer ‘Zip’ button
feed URL:Outlook Add RSS Feed
file URL:File Protocol
FirefoxURL Firefox URL
ftp URL:File Transfer Protocol
git-client Git Protocol Handler
github-windows URL:github-windows
grvopen URL: OneDrive Client Protocol
http URL:HyperText Transfer Protocol
https URL:HyperText Transfer Protocol with Privacy
im URL:IM Protocol
imesync
kindle URL:Amazon Kindle
launchreader URL:Acrobat Protocol
LDAP URL:LDAP Protocol
line URL:LINE Protocol
lineb URL:LINE Protocol
mailto Thunderbird URL
mapi
mapi16
maps URL:maps
message-messenger URL:message-messenger
microsoft.windows.camera URL:microsoft.windows.camera
microsoft.windows.camera.picker URL:microsoft.windows.camera.picker
microsoft.windows.photos.crop URL:microsoft.windows.photos.crop
microsoft.windows.photos.picker URL:microsoft.windows.photos.picker
microsoft.windows.photos.search URL:microsoft.windows.photos.search
microsoft.windows.photos.videoedit URL:microsoft.windows.photos.videoedit
Microsoft.Workfolders Microsoft Workfolders
microsoft-edge URL:microsoft-edge
microsoft-edge-holographic URL:microsoft-edge-holographic
microsoftmusic URL:microsoftmusic
microsoftvideo URL:microsoftvideo
mk URL:MK Protocol
MMS Microsoft メディア サーバー プロトコル
ms-aad-brokerplugin URL:ms-aad-brokerplugin
ms-access Url:Access Protocol
ms-actioncenter URL:ms-actioncenter
ms-apprep URL:ms-apprep
ms-availablenetworks URL:Available Networks Protocol
ms-calculator URL:ms-calculator
ms-call URL:ms-call
ms-callrecording URL:ms-callrecording
ms-chat URL:ms-chat
ms-clock URL:ms-clock
ms-contact-support URL:ms-contact-support
ms-cortana URL:ms-cortana
ms-cortana-ainotebook URL:ms-cortana-ainotebook
ms-cxh URL:ms-cxh
ms-cxh-full CloudExperienceHost Launch Protocol
ms-default-location URL:ms-default-location
ms-device-enrollment URL:ms-device-enrollment
ms-drive-to URL:ms-drive-to
ms-duplicate-desktop URL:ms-duplicate-desktop
ms-edu-secureassessment URL:ms-edu-secureassessment
ms-environment-builder URL:ms-environment-builder
ms-excel URL:ms-excel
ms-eyecontrolspeech URL:ms-eyecontrolspeech
ms-gamebarservices URL:ms-gamebarservices
ms-gamingoverlay URL:ms-gamingoverlay
ms-getoffice URL:ms-getoffice
ms-get-started URL:ms-get-started
ms-holocamera URL:ms-holocamera
ms-holographicfirstrun URL:ms-holographicfirstrun
ms-inputapp URL:ms-inputapp
ms-insights URL:ms-insights
ms-ipmessaging URL:ms-ipmessaging
ms-ipmessaging-name URL:ms-ipmessaging-name
ms-mail URL:ms-mail
ms-mmsys
ms-msdt URL:ms-msdt
ms-msime-imepad
ms-msime-imjpdct
msnfinance URL:msnfinance
msnmoney URL:msnmoney
msnnews URL:msnnews
msnsports URL:msnsports
msnweather URL:msnweather
ms-officeapp URL:ms-officeapp
ms-officecmd URL:ms-officecmd
ms-officelens URL:ms-officelens
ms-onedrive URL:ms-onedrive
ms-oobenetwork URL:ms-oobenetwork
ms-paint URL:ms-paint
ms-penworkspace URL:ms-penworkspace
ms-people URL:ms-people
ms-perception-simulation Url:Perception Simulation Protocol
ms-phone URL:ms-phone
ms-phone-companion URL:ms-phone-companion
ms-photos URL:ms-photos
ms-playto-miracast URL:ms-playto-miracast
ms-powerpoint Url:PowerPoint Protocol
ms-projection URL:ms-projection
ms-publisher Url:Publisher Protocol
ms-rdx-document
ms-retaildemo-launchbioenrollment URL:ms-retaildemo-launchbioenrollment
ms-retaildemo-launchstart URL:ms-retaildemo-launchstart
ms-screenclip URL:ms-screenclip
ms-screensketch URL:ms-screensketch
ms-search URL:ms-search
ms-set URL:ms-set
ms-settings URL:ms-settings
ms-settings-airplanemode URL:ms-settings-airplanemode
ms-settings-bluetooth URL:ms-settings-bluetooth
ms-settings-cellular URL:ms-settings-cellular
ms-settings-cloudstorage URL:ms-settings-cloudstorage
ms-settings-connectabledevices URL:Devices Flow Connectable Devices Protocol
ms-settings-displays-topology URL:Devices Flow Display Topology Protocol
ms-settings-emailandaccounts URL:ms-settings-emailandaccounts
ms-settings-language URL:ms-settings-language
ms-settings-location URL:ms-settings-location
ms-settings-lock URL:ms-settings-lock
ms-settings-mobilehotspot URL:ms-settings-mobilehotspot
ms-settings-notifications URL:ms-settings-notifications
ms-settings-power URL:ms-settings-power
ms-settings-privacy URL:ms-settings-privacy
ms-settings-proximity URL:ms-settings-proximity
ms-settings-screenrotation URL:ms-settings-screenrotation
ms-settings-wifi URL:ms-settings-wifi
ms-settings-workplace URL:ms-settings-workplace
ms-sttoverlay URL:ms-sttoverlay
ms-taskswitcher URL:ms-taskswitcher
ms-todo URL:ms-todo
ms-to-do URL:ms-to-do
ms-unistore-email URL:ms-unistore-email
ms-virtualtouchpad URL:Virtual Touchpad
ms-voip-call URL:ms-voip-call
ms-voip-video URL:ms-voip-video
ms-walk-to URL:ms-walk-to
ms-wcrv URL:ms-wcrv
mswindowsmusic
ms-windows-search URL:ms-windows-search
ms-windows-store URL:ms-windows-store
ms-windows-store2 URL:ms-windows-store2
mswindowsvideo
ms-word URL:ms-word
ms-wpc URL:ms-wpc
ms-wpdrmv URL:ms-wpdrmv
ms-xbl-3d8b930f URL:ms-xbl-3d8b930f
ms-xgpueject URL:ms-xgpueject
news Thunderbird (News) URL
nntp Thunderbird (News) URL
odopen URL: OneDrive Client Protocol
oms
OneIndex16 Microsoft OneNote Protocol Handler for Windows Desktop Search
onenote URL:onenote
OneNote.URL.16 URL:OneNote Protocol
onenote-cmd URL:onenote-cmd
OneNoteDesktop URL:OneNote Protocol
OneNoteDesktop.URL.16 URL:OneNote Protocol
Outlook.URL.feed.15 URL:Outlook Add RSS Feed
Outlook.URL.mailto.15 URL:MailTo Protocol
Outlook.URL.stssync.15 URL:Outlook Add Sharepoint Folder
Outlook.URL.webcal.15 URL:Outlook Add Internet Calendar
outlookcal URL:outlookcal
outlookmail URL:outlookmail
paintdotnet URL:paint.net
pbidesktop URL:pbidesktop
pw.oauth2 URL:pw.oauth2
read URL:read
res URL:RES Protocol
search Windows Search Protocol
search-ms Windows Search Protocol
sip URL:Sip Protocol
sips URL:Sips Protocol
skypecheck URL:SkypeCheck Protocol
skypecheck2 URL:SkypeCheck2 Protocol
skypepage URL:skypepage
skypesettings URL:skypesettings
skypesetup URL:skypesetup
skypeuwp URL:skypeuwp
sms URL:sms
snews Thunderbird (News) URL
StickyNotes Sticky Notes Protocol
stssync URL:Outlook Add Sharepoint Folder
tbauth URL:tbauth
tel URL:Tel Protocol
videocall-messenger URL:videocall-messenger
videocall-skype-com URL:videocall-skype-com
vscode URL:vscode
vsls Microsoft Visual Studio Live Share
vstfs TFS Protocol Handler
vsweb Web Protocol Handler
vsweb+vscs URL:Visual Studio Codespaces
vsweb+vsoe URL:Visual Studio Online Environments
webcal URL:Outlook Add Internet Calendar
webcals URL:Outlook Add Internet Calendar
windows.tbauth URL:windows.tbauth
windowsdefender URL:windowsdefender
windows-feedback URL:windows-feedback
windowsreadinglist URL:windowsreadinglist
wlcalendar URL:wlcalendar
wlpeople URL:wlpeople
xbls URL:xbls
xbox URL:xbox
xbox-arena URL:xbox-arena
xbox-friendfinder URL:xbox-friendfinder
xbox-gamehub URL:xbox-gamehub
xboxgames URL:xboxgames
xboxliveapp-1297287741 URL:xboxliveapp-1297287741
xboxmusic URL:xboxmusic
xbox-network URL:xbox-network
xbox-profile URL:xbox-profile
xbox-settings URL:xbox-settings
xbox-store URL:xbox-store
xbox-tcui URL:xbox-tcui
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Linq;
using System.Text;
using Microsoft.Win32;

class Program
{
    static void Main()
    {
        using var hkcr = RegistryKey.OpenBaseKey(
            RegistryHive.ClassesRoot, RegistryView.Registry64);
        var progIds = GetSubKeyNamesWithValueName(
            hkcr, "URL Protocol", StringComparer.OrdinalIgnoreCase);

        var infos = progIds.Select(progId =>
            {
                using var key = hkcr.OpenSubKey(progId);
                return (ProgID: progId, Description: (string)key.GetValue(null, null));
            })
            .ToImmutableArray();

        var buffer = new StringBuilder();
        foreach (var shellFolderInfo in infos.OrderBy(info => info.ProgID))
        {
            var info = shellFolderInfo;
            buffer.AppendLine($"|{info.ProgID}|{info.Description}|");
        }
        var output = buffer.ToString();
        Console.WriteLine(output);
    }

    static ImmutableArray<string> GetSubKeyNamesWithValueName(
        RegistryKey key,
        string valueName,
        IEqualityComparer<string> comparer)
    {
        var names = new List<string>();
        foreach (var keyName in key.GetSubKeyNames())
        {
            using var subKey = key.OpenSubKey(keyName);
            if (subKey.GetValueNames().Contains(valueName, comparer))
            {
                names.Add(keyName);
            }
        }
        return names.ToImmutableArray();
    }
}