Registering a Dll Returns 0X80020009 Error

I am trying to register with regsvr32.exe the prnadmin.dll (on a Win7 target machine) but i get this error 0x80020009

Any suggestions please?

1

7 Answers

regsvr32.exe needs to be run as an administrator. Maybe this was the cause?

0

For Windows Vista/Windows 7 users: Click Start>All Programs>Accessories, then right-click on “Command Prompt” and select “Run as Administrator” Type in the following command exactly as you see it and press ENTER. secedit /configure /cfg %windir%\inf\defltbase.inf /db defltbase.sdb /verbose Wait for the command to complete, it can take some time so please be patient. Once the command has completed, try to register a dll file again.

1

For Windows Vista/Windows 7 users: Click Start > All Programs > Accessories, then right-click on Command Prompt and select Run as Administrator.

Best method I have found is to open the PowerShell ise with administration rights then cd to c:\ and insert your command, for example

regsvr32 "c:\Program Files\Windows Media Player\wmpband.dll"

For Windows Vista/Windows 7 users: Click Start > All Programs > Accessories, then right-click on Command Prompt and select Run as Administrator. Then type: regsvr32 filelocation\fileName Then you see that file which generate error is loadded successfully.

I had a similar problem with our Office COM addin. Visual Studio 2019 could successfully build the C++ code, but the registration failed with the above error code.

Solution was: Some files had a "wrong" file encoding (UTF8-BOM) instead of (UTF8) and after I changed the file encodings everything worked as expected.

You'll need to use the 32bit version of regsvr32 as mentioned in the article.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Sophia Al-Mansoor

Sophia Al-Mansoor

Global Business & E-Commerce Reporter

Sophia analyzes international trade, startup ecosystems, retail transformation, and supply chain logistics for modern digital publications.

Share this article
Twitter Facebook Pinterest