Jump to content

palswim

Member
  • Posts

    4
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    United States

Everything posted by palswim

  1. I checked on Vista, and this problem exists there as well. I also can confirm that the DefaultIcon key and the OpenWithList keys do, in fact work for any PerceivedType: "video" file. So, it's just accessing shell verbs that seems to pose the problems. Like the post above, I found another Windows shell API called "AssocQueryString", which makes a lookup of information about a filetype/ProgID. I made a lookup for the MPG filetype and a lookup for the MKV filetype, looking for the verb "MediaInfoTest" (which I created in [HKEY_CLASSES_ROOT\SystemFileAssociations\video\shell] as I tested all of these things). Note that I'm actually writing this code in C#, so I have to wrap all of these calls with some special code, so the method calls won't quite look correct. The RegMon output for the call: result = AssocQueryString( ASSOCF_NOFIXUPS, ASSOCSTR_COMMAND, ".mpg", "MediaInfoTest", out pOut, ref pOutSize); 1 1.74904048 Verbs Test.vshos:4736 QueryKey HKCU\Software\Classes SUCCESS Name: \REGISTRY\USER\S-[redacted] 2 1.74907839 Verbs Test.vshos:4736 OpenKey HKCU\Software\Classes\.mpg NOT FOUND 3 1.74912035 Verbs Test.vshos:4736 OpenKey HKCR\.mpg SUCCESS Access: 0x2000000 4 1.74930859 Verbs Test.vshos:4736 QueryKey HKCR\.mpg SUCCESS Name: \REGISTRY\MACHINE\SOFTWARE\Classes\.mpg 5 1.74934220 Verbs Test.vshos:4736 OpenKey HKCU\Software\Classes\.mpg NOT FOUND 6 1.74946094 Verbs Test.vshos:4736 QueryValue HKCR\.mpg\(Default) SUCCESS "video.MPEG" 7 1.74948132 Verbs Test.vshos:4736 QueryKey HKCU\Software\Classes SUCCESS Name: \REGISTRY\USER\S-[redacted] 8 1.74964476 Verbs Test.vshos:4736 OpenKey HKCU\Software\Classes\video.MPEG NOT FOUND 9 1.74968994 Verbs Test.vshos:4736 OpenKey HKCR\video.MPEG SUCCESS Access: 0x2000000 10 1.74973106 Verbs Test.vshos:4736 QueryKey HKCR\video.MPEG SUCCESS Name: \REGISTRY\MACHINE\SOFTWARE\Classes\video.MPEG 11 1.74975896 Verbs Test.vshos:4736 OpenKey HKCU\Software\Classes\video.MPEG\CurVer NOT FOUND 12 1.74987292 Verbs Test.vshos:4736 OpenKey HKCR\video.MPEG\CurVer NOT FOUND 13 1.74989080 Verbs Test.vshos:4736 QueryKey HKCR\video.MPEG SUCCESS Name: \REGISTRY\MACHINE\SOFTWARE\Classes\video.MPEG 14 1.74991572 Verbs Test.vshos:4736 OpenKey HKCU\Software\Classes\video.MPEG NOT FOUND 15 1.75017715 Verbs Test.vshos:4736 OpenKey HKCR\video.MPEG SUCCESS Access: 0x2000000 16 1.75030124 Verbs Test.vshos:4736 CloseKey HKCR\video.MPEG SUCCESS 17 1.75032604 Verbs Test.vshos:4736 QueryKey HKCR\video.MPEG SUCCESS Name: \REGISTRY\MACHINE\SOFTWARE\Classes\video.MPEG 18 1.75037527 Verbs Test.vshos:4736 OpenKey HKCU\Software\Classes\video.MPEG\shell\MediaInfoTest NOT FOUND 19 1.75039172 Verbs Test.vshos:4736 OpenKey HKCR\video.MPEG\shell\MediaInfoTest NOT FOUND 20 1.75055933 Verbs Test.vshos:4736 QueryKey HKCU\Software\Classes SUCCESS Name: \REGISTRY\USER\S-[redacted] 21 1.75057948 Verbs Test.vshos:4736 OpenKey HKCU\Software\Classes\SystemFileAssociations\.mpg NOT FOUND 22 1.75069797 Verbs Test.vshos:4736 OpenKey HKCR\SystemFileAssociations\.mpg NOT FOUND 23 1.75072646 Verbs Test.vshos:4736 QueryKey HKCU\Software\Classes SUCCESS Name: \REGISTRY\USER\S-[redacted] 24 1.75091529 Verbs Test.vshos:4736 OpenKey HKCU\Software\Classes\SystemFileAssociations\video SUCCESS Access: 0x2000000 25 1.75094092 Verbs Test.vshos:4736 QueryKey HKCU\Software\Classes\SystemFileAssociations\video SUCCESS Name: \REGISTRY\USER\S-[redacted]\SystemFileAssociations\video 26 1.75107753 Verbs Test.vshos:4736 OpenKey HKCU\Software\Classes\SystemFileAssociations\video\shell\MediaInfoTest NOT FOUND 27 1.75117898 Verbs Test.vshos:4736 OpenKey HKCR\SystemFileAssociations\video\shell\MediaInfoTest SUCCESS Access: 0x2000000 28 1.75153852 Verbs Test.vshos:4736 QueryKey HKCR\SystemFileAssociations\video\shell\MediaInfoTest SUCCESS Name: \REGISTRY\MACHINE\SOFTWARE\Classes\SystemFileAssociations\video\Shell\MediaInfoTest 29 1.75158155 Verbs Test.vshos:4736 OpenKey HKCU\Software\Classes\SystemFileAssociations\video\Shell\MediaInfoTest\command NOT FOUND 30 1.75164187 Verbs Test.vshos:4736 OpenKey HKCR\SystemFileAssociations\video\shell\MediaInfoTest\command SUCCESS Access: 0x1 31 1.75173855 Verbs Test.vshos:4736 QueryKey HKCR\SystemFileAssociations\video\shell\MediaInfoTest\command SUCCESS Name: \REGISTRY\MACHINE\SOFTWARE\Classes\SystemFileAssociations\video\Shell\MediaInfoTest\Command 32 1.75176954 Verbs Test.vshos:4736 OpenKey HKCU\Software\Classes\SystemFileAssociations\video\Shell\MediaInfoTest\Command NOT FOUND 33 1.75183129 Verbs Test.vshos:4736 QueryValue HKCR\SystemFileAssociations\video\shell\MediaInfoTest\command\(Default) SUCCESS ""C:\Program Files\video\MediaInfo\MediaInfo.exe" "%1"" 34 1.75188470 Verbs Test.vshos:4736 CloseKey HKCR\SystemFileAssociations\video\shell\MediaInfoTest\command SUCCESS 35 1.75215733 Verbs Test.vshos:4736 CloseKey HKCR\.mpg SUCCESS 36 1.75224137 Verbs Test.vshos:4736 CloseKey HKCR\video.MPEG SUCCESS 37 1.75226486 Verbs Test.vshos:4736 CloseKey HKCR\SystemFileAssociations\video\shell\MediaInfoTest SUCCESS 38 1.75228167 Verbs Test.vshos:4736 CloseKey HKCU\Software\Classes\SystemFileAssociations\video SUCCESS And the RegMon output for the call: result = AssocQueryString( ASSOCF_NOFIXUPS, ASSOCSTR_COMMAND, ".mkv", "MediaInfoTest", out pOut, ref pOutSize); 1 1.34380400 Verbs Test.vshos:5936 QueryKey HKCU\Software\Classes SUCCESS Name: \REGISTRY\USER\S-[redacted] 2 1.34384561 Verbs Test.vshos:5936 OpenKey HKCU\Software\Classes\.mkv NOT FOUND 3 1.34391665 Verbs Test.vshos:5936 OpenKey HKCR\.mkv SUCCESS Access: 0x2000000 4 1.34395158 Verbs Test.vshos:5936 QueryKey HKCR\.mkv SUCCESS Name: \REGISTRY\MACHINE\SOFTWARE\Classes\.mkv 5 1.34400380 Verbs Test.vshos:5936 OpenKey HKCU\Software\Classes\.mkv NOT FOUND 6 1.34402895 Verbs Test.vshos:5936 QueryValue HKCR\.mkv\(Default) SUCCESS "avc.Matroska" 7 1.34406769 Verbs Test.vshos:5936 QueryKey HKCU\Software\Classes SUCCESS Name: \REGISTRY\USER\S-[redacted] 8 1.34410048 Verbs Test.vshos:5936 OpenKey HKCU\Software\Classes\avc.Matroska NOT FOUND 9 1.34415972 Verbs Test.vshos:5936 OpenKey HKCR\avc.Matroska SUCCESS Access: 0x2000000 10 1.34419596 Verbs Test.vshos:5936 QueryKey HKCR\avc.Matroska SUCCESS Name: \REGISTRY\MACHINE\SOFTWARE\Classes\avc.Matroska 11 1.34424686 Verbs Test.vshos:5936 OpenKey HKCU\Software\Classes\avc.Matroska\CurVer NOT FOUND 12 1.34427392 Verbs Test.vshos:5936 OpenKey HKCR\avc.Matroska\CurVer NOT FOUND 13 1.34430385 Verbs Test.vshos:5936 QueryKey HKCR\avc.Matroska SUCCESS Name: \REGISTRY\MACHINE\SOFTWARE\Classes\avc.Matroska 14 1.34434903 Verbs Test.vshos:5936 OpenKey HKCU\Software\Classes\avc.Matroska NOT FOUND 15 1.34440470 Verbs Test.vshos:5936 OpenKey HKCR\avc.Matroska SUCCESS Access: 0x2000000 16 1.34443343 Verbs Test.vshos:5936 CloseKey HKCR\avc.Matroska SUCCESS 17 1.34448373 Verbs Test.vshos:5936 QueryKey HKCR\avc.Matroska SUCCESS Name: \REGISTRY\MACHINE\SOFTWARE\Classes\avc.Matroska 18 1.34453201 Verbs Test.vshos:5936 OpenKey HKCU\Software\Classes\avc.Matroska\shell\MediaInfoTest NOT FOUND 19 1.34456110 Verbs Test.vshos:5936 OpenKey HKCR\avc.Matroska\shell\MediaInfoTest NOT FOUND 20 1.34460723 Verbs Test.vshos:5936 QueryKey HKCU\Software\Classes SUCCESS Name: \REGISTRY\USER\S-[redacted] 21 1.34470272 Verbs Test.vshos:5936 OpenKey HKCU\Software\Classes\SystemFileAssociations\.mkv NOT FOUND 22 1.34473240 Verbs Test.vshos:5936 OpenKey HKCR\SystemFileAssociations\.mkv NOT FOUND 23 1.34478295 Verbs Test.vshos:5936 QueryKey HKCU\Software\Classes SUCCESS Name: \REGISTRY\USER\S-[redacted] 24 1.34481227 Verbs Test.vshos:5936 OpenKey HKCU\Software\Classes\.mkv NOT FOUND 25 1.34486508 Verbs Test.vshos:5936 OpenKey HKCR\.mkv SUCCESS Access: 0x1 26 1.34489107 Verbs Test.vshos:5936 QueryKey HKCR\.mkv SUCCESS Name: \REGISTRY\MACHINE\SOFTWARE\Classes\.mkv 27 1.34493351 Verbs Test.vshos:5936 OpenKey HKCU\Software\Classes\.mkv NOT FOUND 28 1.34495807 Verbs Test.vshos:5936 QueryValue HKCR\.mkv\PerceivedType SUCCESS "video" 29 1.34498131 Verbs Test.vshos:5936 CloseKey HKCR\.mkv SUCCESS 30 1.34501874 Verbs Test.vshos:5936 QueryKey HKCU\Software\Classes SUCCESS Name: \REGISTRY\USER\S-[redacted] 31 1.34505248 Verbs Test.vshos:5936 OpenKey HKCU\Software\Classes\SystemFileAssociations\video NOT FOUND 32 1.34511340 Verbs Test.vshos:5936 OpenKey HKCR\SystemFileAssociations\video SUCCESS Access: 0x2000000 33 1.34514999 Verbs Test.vshos:5936 CloseKey HKCR\.mkv SUCCESS 34 1.34517431 Verbs Test.vshos:5936 CloseKey HKCR\avc.Matroska SUCCESS 35 1.34520054 Verbs Test.vshos:5936 CloseKey HKCR\SystemFileAssociations\video SUCCESS If you follow what it's doing, the MKV call finds that the PerceivedType is "video", and then takes the path to access the SystemFileAssociations\video key, but then inexplicably quits once it arrives there. But, the MPG one never queries the PerceivedType value (presumably because it's Hard-coded, like above), yet it heads straight to the SystemFileAssociations\video\shell\MediaInfoTest key.
  2. Did some more research and found some articles about a function in the Windows APIs: "AssocGetPerceivedType" http://msdn.microsoft.com/en-us/library/bb...28VS.85%29.aspx http://www.geoffchappell.com/studies/windo...rceivedtype.htm I created a quick project which made a few calls to this API result = AssocGetPerceivedType(".txt", out pType, out pFlag, out psType); // Call succeeded, pType: 1, pFlag: 5, psType: "text" result = AssocGetPerceivedType(".mpg", out pType, out pFlag, out psType); // Call succeeded, pType: 4, pFlag: 38, psType: "video" result = AssocGetPerceivedType(".mkv", out pType, out pFlag, out psType); // Call succeeded, pType: 4, pFlag: 1, psType: "video" // I've done this with other file types too, all with predictable results So, this call recognizes an MKV as the built-in video type (PERCEIVED_TYPE_VIDEO), and the flags it sets for MPG (Hard-coded, Native Support, WMSDK) versus the flags for MKV (Soft-coded) make sense. But, I guess the right-click algorithm doesn't use this API method. Edit: Apparently there's some controversy with that non-MSDN link, but it has some really helpful information.
  3. Also, I'm running XP Pro, so the issue isn't Media Center specific.
  4. Wow, sorry to resurrect a topic that's over three years old, but I'm wondering the same thing! I've tried setting FLAC files as ContentType "audio", MKV files as ContentType "video" and other similar types as well. But, it seems that only files which Windows supports out of the box (AVI, MPG, WMV, WAV, MP3, etc.) also support the ContentType-to-SystemFileAssociations mapping. I also used RegMon to see what Windows was doing and found some confusing data. According to RegMon, for an MKV file, Windows made the following registry queries: 98 0.93894756 explorer.exe:2016 OpenKey HKCR\.mkv SUCCESS Access: 0x1 99 0.93896878 explorer.exe:2016 QueryKey HKCR\.mkv SUCCESS Name: \REGISTRY\MACHINE\SOFTWARE\Classes\.mkv 100 0.93900788 explorer.exe:2016 OpenKey HKCU\Software\Classes\.mkv NOT FOUND 101 0.93902910 explorer.exe:2016 QueryValue HKCR\.mkv\PerceivedType SUCCESS "video" 102 0.93905175 explorer.exe:2016 CloseKey HKCR\.mkv SUCCESS 103 0.93908191 explorer.exe:2016 QueryKey HKCU\Software\Classes SUCCESS Name: \REGISTRY\USER\S-[redacted] 104 0.93910986 explorer.exe:2016 OpenKey HKCU\Software\Classes\SystemFileAssociations\video NOT FOUND 105 0.93917441 explorer.exe:2016 OpenKey HKCR\SystemFileAssociations\video SUCCESS Access: 0x2000000 106 0.93920624 explorer.exe:2016 QueryKey HKCU\Software\Classes SUCCESS Name: \REGISTRY\USER\S-[redacted] So, it accesses the PerceivedType value of [HKCR\.mkv] and opens the [HKCR\SystemFileAssociations\video] key, but it never has a QueryKey entry for [HKCR\SystemFileAssociations\video]. On the other hand, for an MPG file, RegMon reported: 60 2.27974176 explorer.exe:2016 QueryKey HKCU\Software\Classes SUCCESS Name: \REGISTRY\USER\S-[redacted] 61 2.27977014 explorer.exe:2016 OpenKey HKCU\Software\Classes\SystemFileAssociations\video NOT FOUND 62 2.27983928 explorer.exe:2016 OpenKey HKCR\SystemFileAssociations\video SUCCESS Access: 0x2000000 63 2.27987504 explorer.exe:2016 QueryKey HKCR\SystemFileAssociations\video SUCCESS Name: \REGISTRY\MACHINE\SOFTWARE\Classes\SystemFileAssociations\video 64 2.27991986 explorer.exe:2016 OpenKey HKCU\Software\Classes\SystemFileAssociations\video\ShellEx\DataHandler NOT FOUND 65 2.27994323 explorer.exe:2016 OpenKey HKCR\SystemFileAssociations\video\ShellEx\DataHandler NOT FOUND Nowhere did Windows access any "PerceivedType" field, but seemingly out of the blue, it went straight to the [HKCR\SystemFileAssociations\video], and both opened and queried it. Next, I think I'll try making a custom PerceivedType, because maybe Windows has internally reserved "audio" and "video", which would be ridiculous, but would fit with the data I'm seeing.
×
×
  • Create New...