windows - 在 Windows 10 64 位中注册 DLL 而不将其移动到 System32

标签 windows dll registry windows-credential-provider

我必须在 Windows 注册表中为自定义凭据提供程序注册 dll。当前的register.reg看起来像这样:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\Credential Providers\{5fd3d285-0dd9-4362-8855-e0abaacd4af6}]
@="WLA"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\Credential Provider Filters\{5fd3d285-0dd9-4362-8855-e0abaacd4af6}]
@="WLA"

[HKEY_CLASSES_ROOT\CLSID\{5fd3d285-0dd9-4362-8855-e0abaacd4af6}]
@="WLA"

[HKEY_CLASSES_ROOT\CLSID\{5fd3d285-0dd9-4362-8855-e0abaacd4af6}\InprocServer32]
@="WLA.dll"
"ThreadingModel"="Apartment"

我必须将 dll 复制到 C:\Windows\System32 并运行 register.reg 才能使其工作,但我不希望这样。是否可以注册 dll,而无需移入 System32 并从当前工作目录(其中 register.reg 与 dll 一起所在)进行注册。

我对此很陌生,任何有关这方面的帮助将不胜感激。

谢谢!

最佳答案

假设您想从 C:\WLA 注册。现在,寄存器文件将如下所示

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\Credential Providers\{5fd3d285-0dd9-4362-8855-e0abaacd4af6}]
@="WLA"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\Credential Provider Filters\{5fd3d285-0dd9-4362-8855-e0abaacd4af6}]
@="WLA"

[HKEY_CLASSES_ROOT\CLSID\{5fd3d285-0dd9-4362-8855-e0abaacd4af6}]
@="WLA"

[HKEY_CLASSES_ROOT\CLSID\{5fd3d285-0dd9-4362-8855-e0abaacd4af6}\InprocServer32]
@="C:\\WLA\\WLA.dll"
"ThreadingModel"="Apartment"

现在应该可以工作了。

关于windows - 在 Windows 10 64 位中注册 DLL 而不将其移动到 System32,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60890765/

相关文章:

php - 如何使用 rmdir 删除 Windows 目录?

rust - 如何使用 Rust 跟踪获取/存储跨度持续时间?

c# - 通过 Windows 注册表禁用 IE11 中的自动完成

c# - 如何让应用程序名称显示在打开方式列表中?

windows - 在 Windows 上的默认浏览器中打开带有参数的本地 html 文件

windows - 有没有办法在 Windows 上运行 LibreSSL?

c++ - 任务托盘中没有图标的窗口怎么办?

C++ 带有 dll 的单例类

python - 在 C++ 中嵌入 python 时出现模块问题

c++ - Indy 9.0.50 openssl dll