質問するログイン新規登録

回答編集履歴

3

回答編集:コード中に変なの「"aPerceivedType"="image"」が残ってたので削除m\(__\)m

2017/02/22 08:59

投稿

Y.H.
Y.H.

スコア7918

answer CHANGED
@@ -1,17 +1,21 @@
1
-
2
1
  .jpgに関するレジストリから以下をコピーし`.jpg`を`.myjpg`に置き換えて登録すれば`*.myjpg`でサムネイル表示がされました。
3
2
  HKCR\.myjpg\shell\open\command の値は起動するプログラムを指定ください。
4
3
  以下では`"%ProgramFiles%\Windows NT\Accessories\WORDPAD.EXE" "%1"`としています。
5
4
 
6
5
  regist-myjpg.reg
7
6
 
7
+ Windows7で動作確認しましたので、もしかするとWindows10では以下のGUID値(CLASSID)が変更になってるかもしれません。(変更はされてないとは思いますがねんのため)
8
+ 変更になってたら`HKEY_CLASSES_ROOT\SystemFileAssociations\.jpg\ShellEx\`を参照し.jpgのものをコピーしてください。
9
+ > [HKEY_CLASSES_ROOT\SystemFileAssociations\.myjpg\ShellEx\{e357fccd-a995-4576-b01f-234630154e96}]
10
+ > @="{C7657C4A-9F68-40fa-A4DF-96BC08EB3551}"
11
+
12
+
8
13
  ```
9
14
  Windows Registry Editor Version 5.00
10
15
 
11
16
  [HKEY_CLASSES_ROOT\.myjpg]
12
17
  "Content Type"="image/jpeg"
13
18
  @="myjpg"
14
- "aPerceivedType"="image"
15
19
 
16
20
  [HKEY_CLASSES_ROOT\.myjpg\shell\open\command]
17
21
  @=hex(2):22,00,25,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,46,00,69,00,6c,\

2

回答編集:サムネイル表示のレジストリ登録を追加

2017/02/22 08:59

投稿

Y.H.
Y.H.

スコア7918

answer CHANGED
@@ -1,3 +1,44 @@
1
+
2
+ .jpgに関するレジストリから以下をコピーし`.jpg`を`.myjpg`に置き換えて登録すれば`*.myjpg`でサムネイル表示がされました。
3
+ HKCR\.myjpg\shell\open\command の値は起動するプログラムを指定ください。
4
+ 以下では`"%ProgramFiles%\Windows NT\Accessories\WORDPAD.EXE" "%1"`としています。
5
+
6
+ regist-myjpg.reg
7
+
8
+ ```
9
+ Windows Registry Editor Version 5.00
10
+
11
+ [HKEY_CLASSES_ROOT\.myjpg]
12
+ "Content Type"="image/jpeg"
13
+ @="myjpg"
14
+ "aPerceivedType"="image"
15
+
16
+ [HKEY_CLASSES_ROOT\.myjpg\shell\open\command]
17
+ @=hex(2):22,00,25,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,46,00,69,00,6c,\
18
+ 00,65,00,73,00,25,00,5c,00,57,00,69,00,6e,00,64,00,6f,00,77,00,73,00,20,00,\
19
+ 4e,00,54,00,5c,00,41,00,63,00,63,00,65,00,73,00,73,00,6f,00,72,00,69,00,65,\
20
+ 00,73,00,5c,00,57,00,4f,00,52,00,44,00,50,00,41,00,44,00,2e,00,45,00,58,00,\
21
+ 45,00,22,00,20,00,22,00,25,00,31,00,22,00,00,00
22
+
23
+ [HKEY_CLASSES_ROOT\SystemFileAssociations\.myjpg]
24
+ "PreviewDetails"="prop:System.Photo.DateTaken;System.Keywords;*System.Photo.PeopleNames;System.Rating;*System.Image.Dimensions;*System.Size;System.Title;System.Author;System.Comment;*System.OfflineAvailability;*System.OfflineStatus;System.Photo.CameraManufacturer;System.Photo.CameraModel;System.Subject;*System.Photo.FNumber;*System.Photo.ExposureTime;*System.Photo.ISOSpeed;*System.Photo.ExposureBias;*System.Photo.FocalLength;*System.Photo.MaxAperture;*System.Photo.MeteringMode;*System.Photo.SubjectDistance;*System.Photo.Flash;*System.Photo.FlashEnergy;*System.Photo.FocalLengthInFilm;*System.DateCreated;*System.DateModified;*System.SharedWith"
25
+ "FullDetails"="prop:System.PropGroup.Description;System.Title;System.Subject;System.Rating;System.Keywords;*System.Photo.PeopleNames;System.Comment;System.PropGroup.Origin;System.Author;System.Photo.DateTaken;System.ApplicationName;System.DateAcquired;System.Copyright;System.PropGroup.Image;System.Image.ImageID;System.Image.Dimensions;System.Image.HorizontalSize;System.Image.VerticalSize;System.Image.HorizontalResolution;System.Image.VerticalResolution;System.Image.BitDepth;System.Image.Compression;System.Image.ResolutionUnit;System.Image.ColorSpace;System.Image.CompressedBitsPerPixel;System.PropGroup.Camera;System.Photo.CameraManufacturer;System.Photo.CameraModel;System.Photo.FNumber;System.Photo.ExposureTime;System.Photo.ISOSpeed;System.Photo.ExposureBias;System.Photo.FocalLength;System.Photo.MaxAperture;System.Photo.MeteringMode;System.Photo.SubjectDistance;System.Photo.Flash;System.Photo.FlashEnergy;System.Photo.FocalLengthInFilm;System.PropGroup.PhotoAdvanced;System.Photo.LensManufacturer;System.Photo.LensModel;System.Photo.FlashManufacturer;System.Photo.FlashModel;System.Photo.CameraSerialNumber;System.Photo.Contrast;System.Photo.Brightness;System.Photo.LightSource;System.Photo.ExposureProgram;System.Photo.Saturation;System.Photo.Sharpness;System.Photo.WhiteBalance;System.Photo.PhotometricInterpretation;System.Photo.DigitalZoom;System.Photo.EXIFVersion;System.PropGroup.GPS;*System.GPS.Latitude;*System.GPS.Longitude;*System.GPS.Altitude;System.PropGroup.FileSystem;System.ItemNameDisplay;System.ItemType;System.ItemFolderPathDisplay;System.DateCreated;System.DateModified;System.Size;System.FileAttributes;System.OfflineAvailability;System.OfflineStatus;System.SharedWith;System.FileOwner;System.ComputerName"
26
+ "InfoTip"="prop:System.ItemType;System.Photo.DateTaken;System.Keywords;*System.Photo.PeopleNames;System.Rating;*System.Image.Dimensions;*System.Size;System.Title"
27
+ "ExtendedTileInfo"="prop:System.ItemType;System.Photo.DateTaken;*System.Image.Dimensions"
28
+ "SetDefaultsFor"="prop:System.Author;System.Document.DateCreated;System.Photo.DateTaken"
29
+ "ImageOptionFlags"=dword:00000001
30
+
31
+ [HKEY_CLASSES_ROOT\SystemFileAssociations\.myjpg\ShellEx]
32
+
33
+ [HKEY_CLASSES_ROOT\SystemFileAssociations\.myjpg\ShellEx\{e357fccd-a995-4576-b01f-234630154e96}]
34
+ @="{C7657C4A-9F68-40fa-A4DF-96BC08EB3551}"
35
+
36
+ ```
37
+
38
+
39
+ ----
40
+
41
+
1
42
  shell拡張(Shell Extensions)を作成します。
2
43
  Explorerの拡張モジュールを作成する形になります。
3
44
 

1

回答追記

2017/02/22 08:30

投稿

Y.H.
Y.H.

スコア7918

answer CHANGED
@@ -7,6 +7,7 @@
7
7
 
8
8
  [Writing Windows Shell Extension with .NET 4 - Part 3](http://geekswithblogs.net/Jialiang/archive/2010/11/08/writing-windows-shell-extension-with-.net-4---part-3.aspx)
9
9
 
10
- 検索ワードとしては「Windows10 ShellExtention IExtractIcon IExtractImage」こんなところですかね。
10
+ 検索ワードとしては「Windows ShellExtention IExtractIcon IExtractImage」こんなところですかね。
11
+ 基本的に日本語の情報は少ないです。また、.NETでの実装を説明しているものは極々少数です。
11
12
 
12
13
  当然、作成したモジュールに不具合があればExplorer自体の動作に影響が出ます。