You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何在Windows 7资源管理器中启用VBA代码等文件的预览功能?

Enable Preview Pane for .log, .list, and VBA Files via PerceivedType Registry Entry

Great question! Adding the PerceivedType registry string is exactly the right move to get these text-based file types showing up in Windows Explorer's preview pane. Here's a safe, step-by-step breakdown tailored to your needs:

First: Backup Your Registry (Critical!)

Before tweaking any registry settings, it’s wise to back up the relevant keys or your entire registry. Here’s how:

  • In Registry Editor (regedit), right-click the key you’re about to modify (e.g., HKEY_CLASSES_ROOT\.log) and select Export.
  • Save the .reg file somewhere secure—this lets you revert changes if anything goes wrong.

Option 1: Manual Registry Editing

Repeat these steps for each file type: .log, .list, .bas, .cls, .frm

  1. Press Win + R, type regedit, and hit Enter. Confirm the User Account Control prompt if it appears.
  2. Navigate to the registry key for your target file extension:
    • .log: HKEY_CLASSES_ROOT\.log
    • .list: HKEY_CLASSES_ROOT\.list
    • .bas: HKEY_CLASSES_ROOT\.bas
    • .cls: HKEY_CLASSES_ROOT\.cls
    • .frm: HKEY_CLASSES_ROOT\.frm
  3. Right-click the extension key, hover over New, and select String Value.
  4. Name the new string PerceivedType.
  5. Double-click PerceivedType, set its Value data to text, and click OK.

Option 2: One-Click .reg File Import

If you want to set up all these file types at once, create a registry import file:

  1. Open Notepad and paste this code:
    Windows Registry Editor Version 5.00
    
    [HKEY_CLASSES_ROOT\.log]
    "PerceivedType"="text"
    
    [HKEY_CLASSES_ROOT\.list]
    "PerceivedType"="text"
    
    [HKEY_CLASSES_ROOT\.bas]
    "PerceivedType"="text"
    
    [HKEY_CLASSES_ROOT\.cls]
    "PerceivedType"="text"
    
    [HKEY_CLASSES_ROOT\.frm]
    "PerceivedType"="text"
    
  2. Save the file as EnableTextPreview.reg (make sure Save as type is set to All Files to avoid adding a .txt extension).
  3. Double-click the saved .reg file, confirm the prompts to import the settings into your registry.

Final Steps to Activate Changes

After editing the registry:

  • Restart Windows Explorer: Open Task Manager (Ctrl + Shift + Esc), find Windows Explorer under the Processes tab, right-click it, and select Restart.
  • Ensure the preview pane is enabled: In Explorer, go to the View tab and check Preview pane.

Quick Note

If any of these file types already have a PerceivedType entry (uncommon for most of these), just double-click it and change the value to text instead of creating a new entry. This tells Explorer to treat the file as a text document, triggering the same built-in previewer used for .txt files.

内容的提问来源于stack exchange,提问作者Tom the Toolman

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.27 04:20:53