在 Windows 10 64 位中注册 DLL 而不将其移动到 System32
Register DLL without moving it to System32 in Windows 10 64 bit
我必须在 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 注册表中为自定义凭据提供程序注册 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"
现在应该可以了。