我必须在 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/