Skip to content

Commit

Permalink
[FileExplorer Add-ons][Dev files] Add regfile registry key for previe…
Browse files Browse the repository at this point in the history
…wing .reg files (#20579)

* Add regfile registry key for previewing .reg files

* Address PR comments
  • Loading branch information
stefansjfw committed Sep 28, 2022
1 parent 82fea7e commit 7c0bf9f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/common/utils/registry.h
Expand Up @@ -378,6 +378,12 @@ namespace registry
std::wstring kindMapPath = L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\KindMap";
changes.push_back({ HKEY_LOCAL_MACHINE, kindMapPath, fileType, fileKindType, false});
}
if (handlerType == PreviewHandlerType::preview && fileType == L".reg")
{
// this regfile registry key has precedence over Software\Classes\.reg for .reg files
std::wstring regfilePath = L"Software\\Classes\\regfile\\shellex\\" + IPREVIEW_HANDLER_CLSID + L"\\";
changes.push_back({ scope, regfilePath, std::nullopt, handlerClsid });
}
}

if (handlerType == PreviewHandlerType::preview)
Expand Down

0 comments on commit 7c0bf9f

Please sign in to comment.