Executable file produces no output, silently fails in Windows Docker container

Container info:

Windows Server 2019 Standard image running on Windows Server 2019 Standard

I have an executable file (HpToolsLauncher/HpToolsLauncher.exe at main · levi-blodgett/HpToolsLauncher · GitHub, a plugin inside of Jenkins supplies then runs the executable) that I cannot get any output from no matter what I do, if you just call the .exe outright on any other systems I have tried (Windows 10 and Windows Server 2019 systems, 5 different ones) this is the output:

C:\Users\LeviBlodgett\Documents\dependencies>.\HpToolsLauncher.exe   
"Started..."
Micro Focus Automation Tools Command Line Executer
Usage: HpToolsLauncher.exe  -paramfile <a file in key=value format>   -encoding ASCII | UTF-7 |
UTF-8 | UTF-16
...etc...

This .exe should produce this output when called from the command line in any directory, and the permissions are good.

However when ran inside my docker container (after connecting with “docker exec -it <container_id> powershell”):

PS C:\dependencies> .\HpToolsLauncher.exe
PS C:\dependencies> 

No setup is needed for this .exe to run, it is the exact same file, I have checked:

    .NET version
    Permissions
    Security
    Dependencies (possible I missed something, was using https://github.com/lucasg/Dependencies)
    Running on cmd and powershell, as user and as admin
    https://stackoverflow.com/questions/60823381/unable-to-run-32-bit-exe-in-windows-containers (tested the executable on a new image with no config, using the 02.20.20 release of MS core and I still get no output.

Examples of .exe files I can either get output from or see the process for in the container:

notepad.exe
git.exe
python.exe

Dockerfile:

FROM jenkins/jenkins:jdk11-hotspot-windowsservercore-2019

# set paths
RUN $env:PATH = $env:PATH + ';C:\Python\;C:\Python\lib\site-packages\;C:\Python\Scripts\;C:\Users\jenkins\AppData\Roaming\Python\Python310\Scripts;C:\MinGit\cmd\;C:\MinGit\cmd'; \
Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\' -Name Path -Value $env:PATH;

# download, install mingit
RUN Invoke-WebRequest 'https://github.com/git-for-windows/git/releases/download/v2.12.2.windows.2/MinGit-2.12.2.2-64-bit.zip' -OutFile MinGit.zip; \
Expand-Archive c:\MinGit.zip -DestinationPath c:\MinGit;

# download, install Python 3
RUN Invoke-WebRequest 'https://www.python.org/ftp/python/3.10.6/python-3.10.6-embed-amd64.zip' -OutFile python.zip; \
Expand-Archive c:\python.zip -DestinationPath c:\Python;

# download, install pip
RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py ; \
python get-pip.py ; \
Add-Content -Path C:\Python\python310._pth -Exclude help* -Value 'lib\site-packages';

# download, install pip packages
RUN pip install imap_tools requests;

# download, set shell, then install visualsvn
RUN Invoke-WebRequest 'https://www.visualsvn.com/files/VisualSVN-Server-5.0.3-x64.msi' -OutFile svn.msi;
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"];
RUN Start-Process 'svn.msi' '/qn /norestart /L*V "svn.log"' -PassThru | Wait-Process;

# download, install Dependencies.exe and HpToolsLauncher.exe
COPY ./dependencies C:\\dependencies

Has anyone experienced this or know why this is happening?

It looks like you already figured that out:

I know that a DLL is “missing” but I am still trying to figure out if that is the cause, and if so how to install it properly in the docker container.

I am reading through this now to see if I am doing it right:

Unfortunately I am not good enough at Windows containers, so let’s hope someone else can help if you can’t find the solution.

The only thing I can think of is that you need to download that DLL or install it somehow… Windows images are larger than Linux images, but they are still not full Windows systems. Sometimes changing the parent image can help too

As @rimelek mentioned, the Windows images don’t have everything you can find on a regular Windows installation. One option is to check the larger images (Windows or Server). They are larger than Server Core because they have more APIs/features available. I remember seeing this DLL being discussed somewhere that I can’t remember, and the solution was to use the Server image. I have blogged about different Windows images here: Nano Server x Server Core x Server - Which base image is the right one for you? - Microsoft Tech Community