[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
This commit is contained in:
Stefan Markovic 2022-09-28 15:31:25 +02:00 committed by GitHub
parent 82fea7eff1
commit 7c0bf9f1f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)