Notes :
- I am considering that the dll you are trying to register is a valid COM DLL/OCX which can be registered.
- I have taken MYID.dll as an example in this article.
Need : We face challenge while we try to register dll/ocx files for various integrations, particularly for MyKad integration.
There can be 2 causes of error on registering dll file.
Cause 1 : You are trying to register DLL/OCX file using a batch file (.bat) from a folder and you run it as administrator, which is opening the command prompt on System32 directory and finding the DLL/OCX file in System32.
Cause 2 : Directory is correct but Command Prompt is not running as administrator.
Solution : Follow below steps to register the DLL/OCX,
Step 1 : Copy the DLL/OCX file to C:\Windows\System32
Step 2 : Run Command Prompt as Administrator.
Step 3 : Navigate to C:\Windows\System32 in command prompt using command cd C:\Windows\System32
Step 4 : Execute following command to register the DLL/OCX.
regsvr32 MYID.dll
Extras :
- Just in case if you want to UnRegister a DLL/OCX you can use below command,
regsvr32 MYID.dll -u