Skip to content

Commit 7c0bf9f

Browse files
authored
[FileExplorer Add-ons][Dev files] Add regfile registry key for previewing .reg files (#20579)
* Add regfile registry key for previewing .reg files * Address PR comments
1 parent 82fea7e commit 7c0bf9f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/common/utils/registry.h

+6
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,12 @@ namespace registry
378378
std::wstring kindMapPath = L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\KindMap";
379379
changes.push_back({ HKEY_LOCAL_MACHINE, kindMapPath, fileType, fileKindType, false});
380380
}
381+
if (handlerType == PreviewHandlerType::preview && fileType == L".reg")
382+
{
383+
// this regfile registry key has precedence over Software\Classes\.reg for .reg files
384+
std::wstring regfilePath = L"Software\\Classes\\regfile\\shellex\\" + IPREVIEW_HANDLER_CLSID + L"\\";
385+
changes.push_back({ scope, regfilePath, std::nullopt, handlerClsid });
386+
}
381387
}
382388

383389
if (handlerType == PreviewHandlerType::preview)

0 commit comments

Comments
 (0)