|
|
本帖最后由 sairen139 于 2020-5-24 12:34 编辑
研究了一下自windows Vista出现的预览窗格如何显示office文档文件预览的解决方法
在网上找了一些绿色精简的office2010,发现这些精简版之中有些会无法在资源管理器和Everything预览窗格中显示office文档的预览,翻查了一下微软的相关文档,原来是AppID没有对应的问题。解决方案如下:
比如拿doc格式的文件举例,只要
[HKEY_CLASSES_ROOT\.doc\ShellEx\{8895b1c6-b41f-4c1c-a562-0d564250836f}]
@="{84F66100-FF7C-4fb4-B0C0-02CD7FB668FE}"
上面的预览用AppID即{84F66100-FF7C-4fb4-B0C0-02CD7FB668FE}能和注册表[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\PreviewHandlers]下面的"{84F66100-FF7C-4fb4-B0C0-02CD7FB668FE}"="Microsoft Word previewer"一致,就可以正常预览.Doc后缀名的文件!
也就是说注册表里需要有两处相同的AppID就能正常预览该格式的文件!
PS:需要注意的是预览句柄\ShellEx\{8895b1c6-b41f-4c1c-a562-0d564250836f}这个是固定不变的,任何一种格式文件的预览都是这个!
查询AppID可以用previewconfig这个小工具,你可以使用它来给系统增加许多种格式文档的预览窗格的预览!
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\.doc]
@="Word.Document.8"
"Content Type"="application/msword"
[HKEY_CLASSES_ROOT\.doc\PersistentHandler]
@="{98DE59A0-D175-11CD-A7BD-00006B827D94}"
[HKEY_CLASSES_ROOT\.doc\ShellEx]
[HKEY_CLASSES_ROOT\.doc\ShellEx\{8895b1c6-b41f-4c1c-a562-0d564250836f}]
@="{84F66100-FF7C-4fb4-B0C0-02CD7FB668FE}"
[HKEY_CLASSES_ROOT\.doc\Word.Document.8]
[HKEY_CLASSES_ROOT\.doc\Word.Document.8\ShellNew]
"FileName"="word.doc"
"NullFile"=""
[HKEY_CLASSES_ROOT\.docx]
@="Word.Document.12"
"Content Type"="application/vnd.openxmlformats-officedocument.wordprocessingml.document"
[HKEY_CLASSES_ROOT\.docx\PersistentHandler]
@="{D3B41FA1-01E3-49AF-AA25-1D0D824275AE}"
[HKEY_CLASSES_ROOT\.docx\ShellEx]
[HKEY_CLASSES_ROOT\.docx\ShellEx\PropertyHandler]
@="{993BE281-6695-4BA5-8A2A-7AACBFAAB69E}"
[HKEY_CLASSES_ROOT\.docx\ShellEx\{8895b1c6-b41f-4c1c-a562-0d564250836f}]
@="{84F66100-FF7C-4fb4-B0C0-02CD7FB668FE}"
[HKEY_CLASSES_ROOT\.docx\ShellEx\{BB2E617C-0920-11d1-9A0B-00C04FC2D6C1}]
@="{C41662BB-1FA0-4CE0-8DC5-9B7F8279FF97}"
[HKEY_CLASSES_ROOT\.docx\Word.Document.12]
[HKEY_CLASSES_ROOT\.docx\Word.Document.12\ShellNew]
"NullFile"=""
"FileName"="word12.docx"
[HKEY_CLASSES_ROOT\.ppt]
@="PowerPoint.Show.8"
"Content Type"="application/vnd.ms-powerpoint"
[HKEY_CLASSES_ROOT\.ppt\PowerPoint.Show.8]
[HKEY_CLASSES_ROOT\.ppt\PowerPoint.Show.8\ShellNew]
"FileName"="pwrpnt.ppt"
[HKEY_CLASSES_ROOT\.ppt\ShellEx]
[HKEY_CLASSES_ROOT\.ppt\ShellEx\{8895b1c6-b41f-4c1c-a562-0d564250836f}]
@="{65235197-874B-4A07-BDC5-E65EA825B718}"
[HKEY_CLASSES_ROOT\.pptx]
@="PowerPoint.Show.12"
"Content Type"="application/vnd.openxmlformats-officedocument.presentationml.presentation"
"PerceivedType"="document"
[HKEY_CLASSES_ROOT\.pptx\PersistentHandler]
@="{4F46F75F-199F-4C63-8B7D-86D48FE7970C}"
[HKEY_CLASSES_ROOT\.pptx\PowerPoint.Show.12]
[HKEY_CLASSES_ROOT\.pptx\PowerPoint.Show.12\ShellNew]
"NullFile"=""
[HKEY_CLASSES_ROOT\.pptx\ShellEx]
[HKEY_CLASSES_ROOT\.pptx\ShellEx\PropertyHandler]
@="{993BE281-6695-4BA5-8A2A-7AACBFAAB69E}"
[HKEY_CLASSES_ROOT\.pptx\ShellEx\{8895b1c6-b41f-4c1c-a562-0d564250836f}]
@="{65235197-874B-4A07-BDC5-E65EA825B718}"
[HKEY_CLASSES_ROOT\.pptx\ShellEx\{BB2E617C-0920-11d1-9A0B-00C04FC2D6C1}]
@="{C41662BB-1FA0-4CE0-8DC5-9B7F8279FF97}"
[HKEY_CLASSES_ROOT\.xls]
@="Excel.Sheet.8"
"Content Type"="application/vnd.ms-excel"
[HKEY_CLASSES_ROOT\.xls\Excel.Sheet.8]
[HKEY_CLASSES_ROOT\.xls\Excel.Sheet.8\ShellNew]
"FileName"="excel.xls"
[HKEY_CLASSES_ROOT\.xls\ShellEx]
[HKEY_CLASSES_ROOT\.xls\ShellEx\{8895b1c6-b41f-4c1c-a562-0d564250836f}]
@="{00020827-0000-0000-C000-000000000046}"
[HKEY_CLASSES_ROOT\.xlsx]
@="Excel.Sheet.12"
"Content Type"="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
"PerceivedType"="document"
[HKEY_CLASSES_ROOT\.xlsx\Excel.Sheet.12]
[HKEY_CLASSES_ROOT\.xlsx\Excel.Sheet.12\ShellNew]
"FileName"="excel12.xlsx"
[HKEY_CLASSES_ROOT\.xlsx\PersistentHandler]
@="{4887767F-7ADC-4983-B576-88FB643D6F79}"
[HKEY_CLASSES_ROOT\.xlsx\ShellEx]
[HKEY_CLASSES_ROOT\.xlsx\ShellEx\PropertyHandler]
@="{993BE281-6695-4BA5-8A2A-7AACBFAAB69E}"
[HKEY_CLASSES_ROOT\.xlsx\ShellEx\{8895b1c6-b41f-4c1c-a562-0d564250836f}]
@="{00020827-0000-0000-C000-000000000046}"
[HKEY_CLASSES_ROOT\.xlsx\ShellEx\{BB2E617C-0920-11d1-9A0B-00C04FC2D6C1}]
@="{C41662BB-1FA0-4CE0-8DC5-9B7F8279FF97}"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\PreviewHandlers]
"{031EE060-67BC-460d-8847-E4A7C5E45A27}"="Windows Media Player Rich Preview Handler"
"{1531d583-8375-4d3f-b5fb-d23bbd169f22}"="Windows TXT Previewer"
"{8a7cae0e-5951-49cb-bf20-ab3fa1e44b01}"="Windows Font previewer"
"{a42c2ccb-67d3-46fa-abe6-7d2f3488c7a3}"="Windows RTF Previewer"
"{84F66100-FF7C-4fb4-B0C0-02CD7FB668FE}"="Microsoft Word previewer"
"{00020827-0000-0000-C000-000000000046}"="Microsoft Excel Previewer"
"{65235197-874B-4A07-BDC5-E65EA825B718}"="Microsoft PowerPoint previewer"
"{21E17C2F-AD3A-4b89-841F-09CFE02D16B7}"="Microsoft Visio previewer"
|
|