コンテキストメニューに使われる代表的なレジストリキーを解説。
拡張子の関連付けのしくみは複雑ですが、シェルメニューのレジストリは比較的シンプルにまとまっています。
Windows によって定義済の Shell Objects
HKEY_CLASSES_ROOT\
HKEY_CURRENT_USER\Software\Classes\
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\
| Subkey | ファイル | フォルダー | ドライブ |
|---|---|---|---|
| * | ○ | - | - |
| AllFilesystemObjects | ○ | ○ | - |
| Directory | - | ○ | - |
| Folder | - | ○ | ○ |
| Drive | - | - | ○ |
| Subkey | フォルダーの背景 | デスクトップ | ライブラリの背景 |
|---|---|---|---|
| Directory\BackGround | ○ | ○ | - |
| DesktopBackground | - | ○ | - |
| LibraryFolder\Background | - | - | ○ |
Folder\Background は存在しません。
種類によって定義された、Shell Objects
HKEY_CLASSES_ROOT\SystemFileAssociations\
HKEY_CURRENT_USER\Software\Classes\SystemFileAssociations\
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\SystemFileAssociations\
インストールされたプログラム等、ユーザーの環境によって異なります。
ファイルの種類
PerceivedTypeによる。
| Subkey | 拡張子 |
|---|---|
| audio | .aif .mp3 .ogg .wav .wma など |
| compressed | .cab .tar .tgz .z .zip など |
| document | .doc .html .rtf .xlsx .xml など |
| image | .bmp .ico .jpg .png .wmf など |
| system | .chk .manifest .ocx .sys .website など |
| text | .html .ini .s .text .xml など |
| video | .avi .mkv .mpg .TS .wmv など |
フォルダーの種類
最適化された目的による。
| Subkey | フォルダーの種類 |
|---|---|
| Directory.Audio | ミュージック |
| Directory.Image | ピクチャ |
| Directory.Video | ビデオ |
ライブラリの詳細
HKEY_CLASSES_ROOT\LibraryFolder
HKEY_CURRENT_USER\Software\Classes\LibraryFolder\
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\LibraryFolder\
Windows7 から追加された、ライブラリに影響を与えるキー。
ライブラリ
ライブラリ ▶

LibraryFolder は、ライブラリのすぐ下のドキュメント、ピクチャ、ビデオ、その他と、ユーザーが作成したライブラリのみ。個々のライブラリの中は LibraryFolder ではない。
ライブラリは、拡張子 .library-ms のファイルではあるが、コンピューターやごみ箱と同じ特殊フォルダーのため Folder にも属する。* ,AllFilesystemObjects ,Directory には属さない。
冒頭の画面の背景は、Directory\Background。LibraryFolder\Background には属さない。ライブラリが表示されてるのは Directory 上であるのを考えれば理解できる。
ライブラリ以下のファイル、フォルダー
ライブラリ ▶ ピクチャ

表示 ▹ 整列 ▹ がフォルダーなど、ファイルやフォルダーが表示されている場合について。
LibraryFolder 以下は、エクスプローラーと同じメニューになる。
ただし、背景は、Directory\Backgroundではなく、LibraryFolder\Background。
| Subkey | ライブラリ | ライブラリの中のファイル | ライブラリの中のフォルダー |
|---|---|---|---|
| LibraryFolder | ○ | - | - |
| * | - | ○ | - |
| AllFilesystemObjects | - | ○ | ○ |
| Directory | - | - | ○ |
| Folder | ○ | - | ○ |
| Subkey | ライブラリの背景 | ライブラリの中の背景 |
|---|---|---|
| LibraryFolder\Background | - | ○ |
| Directory\BackGround | ○ | - |
ナビゲーションペイン上のライブラリ
| Subkey | |
|---|---|
![]() |
Folder ,Directory\BackGround |
![]() |
LibraryFolder ,Folder ,LibraryFolder\Background |
![]() |
AllFilesystemObjects ,Directory |
![]() |
Drive ,Folder ,LibraryFolder\Background |
Shellメニューの優先度
同じキーがある場合にシェルメニューに優先して表示される順位。
| 優先度 | ファイル | フォルダー | ドライブ |
|---|---|---|---|
| 1 | * | Folder | Folder |
| 2 | AllFilesystemObjects | AllFilesystemObjects | Drive |
| 3 | - | Directory | - |
| 優先度 | ファイル | フォルダー | ドライブ |
|---|---|---|---|
| 1 | - | Directory | Drive |
| 2 | - | Folder | Folder |
| 3 | - | AllFilesystemObjects | - |



