Dsetup.dll missing during installation

I’m trying to install the Epic Games Installer to later install Unreal Engine 4 on Windows 10 on my data drive (D:/) because my main one (C:/) is nearly full (I don’t know if it is of any importance). When I run the installer, I get the error “Unable to find dsetup.dll”. I tried to run the installer as an administrator but it didn’t work. I have DirectX 12 installed.

How can I do?

Here is how I fixed it:

My first attempt was to take one of the DSETUP.dll in the installation folder of one of my Steam games and place it both in C:\Windows\System32 and C:\Windows\SysWOW64. But while it removed the DLL error, another error remained:

There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor.

I followed this answer and entered:

msiexec /i "C:\UnrealEngineInstaller.msi" SKIP_DIRECTX="1"