Register DLL without moving it to System32 in Windows 10 64 bit

917 views Asked by At

I have to register dll in Windows registry for Custom Credential Provider. Current register.reg looks like this:

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"

I have to copy dll to C:\Windows\System32 and run register.reg to make it work but I do not want this. Is it possible to register dll without having to move in System32 and register from present working directory where register.reg lies along with dll.

I am new to this, any help regarding this shall be appreciated.

Thanks!

1

There are 1 answers

0
Muhammad Junaid Haris On BEST ANSWER

Assume you want to register from C:\WLA. Now, the register file will look like

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"

It should work now.