Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DllRegisterServer failed with error code 0x80004005 #15

Open
Quisquose opened this issue Oct 13, 2021 · 9 comments
Open

DllRegisterServer failed with error code 0x80004005 #15

Quisquose opened this issue Oct 13, 2021 · 9 comments
Labels
help wanted Extra attention is needed windows 7 Windows 7 specific issue

Comments

@Quisquose
Copy link

I am unable to register jxl_winthumb.dll, and I keep getting the following error message:

The module "jxl_winthumb.dll" was loaded but the call to the DllRegisterServer failed with error code 0x80004005.

I am running the terminal as Administrator. I have the 64bit version of Microsoft Visual C++ Redistributable for Visual Studio 2019 installed on a 64bit Windows OS, and I'm using the latest version of jxl_winthumb.dll (v0.1.12).

As well as testing this on my main system, I also tried testing in a virtual machine with a fairly clean OS (to rule out any clashes with existing installed software).

However, I am using an older version of Windows (Windows 7 Professional 64bit with Service Pack 1) but I've never had any issues with various other Explorer shell extensions that I've tested in the past for displaying thumbnails and metadata (whether it be for image files, audio files, or video files).

@saschanaz
Copy link
Owner

Hmm, does it fail only on Windows 7 or also on Windows 10?

@Quisquose
Copy link
Author

@saschanaz It took a while for me to be able to answer your question because I only had Windows 10 on a Microsoft test VM disk (which had expired), so I had to re-download the whole thing and start again.

However once the VM was set up, I was able to install jxl_winthumb.dll on Windows 10 with no problem, and jxl images displayed correctly in Windows Explorer.

It still doesn't work on Windows 7 though.

@saschanaz
Copy link
Owner

In that case I think I'll leave this as is for now, mainly because Windows 7 lost the support and also because I have no working Windows 7. I'll accept any contribution but cannot confirm such contribution actually works.

@saschanaz saschanaz added windows 7 Windows 7 specific issue help wanted Extra attention is needed labels Oct 16, 2021
@saschanaz
Copy link
Owner

saschanaz commented Oct 18, 2021

Please file a new issue when you have a separate issue. BTW, I don't think Windows Photo Viewer supports video play, it gives only collections of frames. (Again, if want to reply then please open a new issue for that)

@Crystal-RainSlide
Copy link

Crystal-RainSlide commented Apr 25, 2022

Windows 7: unable to register DLL - Error Code:0X80004005 - Stack Overflow

For users:

Just remember to put jxl_winthumb.dll into a fixed dir / a dir that won't be moved, then follow current "How to install":

  • Open a terminal window as administrator
  • Move to your download directory
  • regsvr32 jxl_winthumb.dll

For developers

If you are looking for a way to let user install / update / uninstall it easily, it's called setup. Either Inno Setup or NSIS, refer to their documentation if you.

Or you may just deliver a batch file so the users can install & uninstall it easily...

When implementing it, the only complex thing is all those path. We start with:

  • %CD%: Current directory
  • %0: The path of the batch script itself, with quotes
  • %~dp0: The path of the directory containing the batch script, without quotes
  • %ComSpec%: The path of cmd.exe

When run a batch script as administrator, the working dir for that script will become the dir containing cmd.exe:

  • which should be the dir part of %ComSpec%,
  • which shoule be %ComSpec:cmd.exe=%,
  • which mostly is C:\Windows\System32\.

Try run show current dir.bat directly, then as admin:

@echo off
echo             Current directory: %CD%\
echo If run directly, it should be: %~dp0
echo If run as admin, it should be: %ComSpec:cmd.exe=%
pause

But jxl_winthumb.dll may very well not existing under C:\Windows\System32\. To stop contaminating the System32 dir like all those hardware driver programs do, we also had better not move jxl_winthumb.dll to there, I put it to a dir inside Program Files.

Instead, to overcome this, we can go back to %~dp0 after run as admin. Either cd \D "%~dp0" or pushd "%~dp0" will work.


My register (run as admin).bat:

@echo off
pushd "%~dp0"
regsvr32 jxl_winthumb.dll

My register.bat which will evalaute automatically:

@echo off
pushd "%~dp0"
reg query "HKU\S-1-5-19" >NUL 2>NUL
if %ERRORLEVEL% == 0 (regsvr32 jxl_winthumb.dll) else mshta vbscript:CreateObject("shell.application").ShellExecute(%0,,,"RunAs",1)(window.close)

My install (run as admin).bat, which will copy the DLL file to a dir in Program Files first:

@echo off
pushd "%~dp0"
set dir=%ProgramFiles%\jxl-winthumb\
set file=jxl_winthumb.dll
set dir_path="%dir%"
set file_path="%dir%\%file%"
if not exist %dir_path% md %dir_path%
copy /BVY %file% %file_path%
pushd %dir_path%
regsvr32 %file%

My install.bat which will evalaute automatically:

@echo off
pushd "%~dp0"
set dir=%ProgramFiles%\jxl-winthumb\
set file=jxl_winthumb.dll
set dir_path="%dir%"
set file_path="%dir%\%file%"
reg query "HKU\S-1-5-19" >NUL 2>NUL
if %ERRORLEVEL% == 0 (
	if not exist %dir_path% md %dir_path%
	copy /BVY %file% %file_path%
	pushd %dir_path%
	regsvr32 %file%
) else mshta vbscript:CreateObject("shell.application").ShellExecute(%0,,,"RunAs",1)(window.close)

I haven't dig into upgading and uninstalling. I found unregistering the dll don't require admin, though.

@sturmen
Copy link

sturmen commented Aug 26, 2022

For anyone running into this on Windows 11: my issue was that I hadn't opened Windows Terminal as an administrator. Don't forget!

@StefanOltmann
Copy link

For anyone running into this on Windows 11: my issue was that I hadn't opened Windows Terminal as an administrator. Don't forget!

That's so typical for Microsoft to display a cryptic error code instead of Permission denied. Try running as admin. you would get on Linux.

@missway
Copy link

missway commented Dec 5, 2024

I also encountered the same malfunction, and the same prompt appeared on the 64-bit Windows 10 LTSC 21H2.

@EDSln
Copy link

EDSln commented Jan 16, 2025

I was able to install v0.8.1 on Windows 7. The solution turned out to be quite strange, but let's go through it in order. First I found that v0.1.10 is installed, but v0.1.11 is not. So there was some problem with WIC, but I didn't understand what the cause was. The solution was to install WebpCodecSetup.exe. Perhaps during installation something is enable on or switched in the system and after that v0.1.11 jxl_winthumb.dll was installed as well as newer versions. I tested this on two OS, it installed on both.

The last working version on Win 7 is v0.8.1, after adding api-ms-win-core-winrt-error-l1-1-0.dll from Win 8.1 to the folder with jxl_winthumb.dll, or system32. To avoid searching where to download api-ms-win-core-winrt-error-l1-1-0.dll from I will attach them in the archive. Newer versions are not installed because there are no system calls yet, if I manage to find how to solve this I will post it here.

I also found that version v0.1.19 is the fastest to open thumbnails and images in the photo viewer.

api-ms-win-core-winrt-error-l1-1-0.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed windows 7 Windows 7 specific issue
Projects
None yet
Development

No branches or pull requests

8 participants
@sturmen @saschanaz @Quisquose @StefanOltmann @missway @Crystal-RainSlide @EDSln and others