I am trying to install the CR runtime in a docker image but getting errors. Tried using the cmd in the image with the same steps, it gives error. Also, running the same steps using a cmd in a local windows system installs the CR successfully. Below are the steps.
- “C:\setup\vc_redist_2022.exe” /quiet /norestart /log “C:\setup\vc_install.log”
“C:\setup\vc_redist_x64.exe” /quiet /norestart /log “C:\setup\vc_install.log”
“C:\setup\vcredist_x64.exe” /quiet /norestart /log “C:\setup\vc_install.log”
“C:\setup\vcredist_x64_1.exe” /quiet /norestart /log “C:\setup\vc_install.log” - type “C:\setup\vc_install.log”
- regsvr32.exe /s C:\Windows\SysWOW64\oledlg.dll
- regsvr32.exe /s C:\Windows\SysWOW64\msvcp140.dll
- regsvr32.exe /s C:\Windows\SysWOW64\vcruntime140.dll
- sc config W3SVC start= disabled
net stop W3SVC - msiexec /i “C:\setup\CRRuntime.msi” /quiet /norestart /log “C:\setup\cr_install.log”
- type “C:\setup\cr_install.log”
- sc config W3SVC start= auto
net start W3SVC
Step number 7 is installing the CR, and step 8 is giving me the error in the logs.
CR Runtime version: 13.0.38.5404
Error Message: CustomAction +pageobjectmodel.dll.3A9D2E22.089E.41EE.8696.6BE8C981E0DD returned actual error code -2147024770 (note this
may not be 100% accurate if translation happened inside sandbox)
MSI (s) (3C:3C) [23:25:30:591]: Product: SAP Crystal Reports runtime engine for .NET Framework (64-bit) – Error 1904. M
odule C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enter
prise XI 4.0\win64_x64\pageobjectmodel.dll failed to register. HRESULT -2147024770. Contact your support personnel.
Error 1904. Module C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP Business
Objects Enterprise XI 4.0\win64_x64\pageobjectmodel.dll failed to register. HRESULT -2147024770. Contact your support
personnel.
Action ended 23:25:30: InstallFinalize. Return value 3.
Below are the steps of the docker:
# Use Windows Server Core with .NET Framework 4.8
FROM mcr.microsoft.com/dotnet/framework/aspnet:4.8-windowsservercore-ltsc2019
# Create setup directory
RUN mkdir C:\setup
# Copy Crystal Reports Runtime (x64) MSI and other dependencies
COPY setup1/CRRuntime.msi C:/setup/
COPY setup1/oledlg.dll C:/Windows/SysWOW64/
COPY setup1/msvcp140.dll C:/Windows/SysWOW64/
COPY setup1/vcruntime140.dll C:/Windows/SysWOW64/
COPY setup1/Fonts/arial.ttf C:/Windows/Fonts/
COPY setup1/Fonts/times.ttf C:/Windows/Fonts/
COPY setup1/vc_redist_2022.exe C:/setup/
COPY setup1/vc_redist_x64.exe C:/setup/
COPY setup1/vcredist_x64.exe C:/setup/
COPY setup1/vcredist_x64_1.exe C:/setup/
# Disable IIS temporarily to avoid file lock issues
RUN powershell -Command "Stop-Service W3SVC; Set-Service W3SVC -StartupType Disabled"
# Install Crystal Reports Runtime and Visual C++ Redistributables
RUN powershell -Command " \
Start-Process 'C:\\setup\\vc_redist_2022.exe' -ArgumentList '/quiet','/norestart' -Wait; \
Start-Process 'C:\\setup\\vc_redist_x64.exe' -ArgumentList '/quiet','/norestart' -Wait; \
Start-Process 'C:\\setup\\vcredist_x64.exe' -ArgumentList '/quiet','/norestart' -Wait; \
Start-Process 'C:\\setup\\vcredist_x64_1.exe' -ArgumentList '/quiet','/norestart' -Wait; \
"
RUN powershell -Command " \
Start-Process 'C:\\Windows\\SysWOW64\\regsvr32.exe' -ArgumentList '/s','C:\\Windows\\SysWOW64\\oledlg.dll' -Wait;"
RUN powershell -Command " \
Start-Process 'C:\\Windows\\SysWOW64\\regsvr32.exe' -ArgumentList '/s','C:\\Windows\\SysWOW64\\msvcp140.dll' -Wait;"
RUN powershell -Command " \
Start-Process 'C:\\Windows\\SysWOW64\\regsvr32.exe' -ArgumentList '/s','C:\\Windows\\SysWOW64\\vcruntime140.dll' -Wait;"
# 🔑 Install Crystal with elevated rights
RUN powershell -Command "Start-Process msiexec.exe -ArgumentList '/i','C:\\setup\\CRRuntime.msi','/quiet','/norestart','/log','C:\\setup\\cr_install.log' -Wait"
# Re-enable and restart IIS
RUN powershell -Command "Set-Service W3SVC -StartupType Auto"
# Optional: Registry fix (only if you have a .reg file that is needed)
COPY setup1/crystal-registry.reg C:/setup/
RUN reg import C:\setup\crystal-registry.reg
COPY setup1/crystal.reg C:/setup/
RUN reg import C:\setup\crystal.reg
# Set working directory to IIS root
WORKDIR /inetpub/wwwroot
# Copy published Web API build output
COPY bin/ .
# Copy referenced DLLs to bin folder
COPY setup1/references/*.dll /inetpub/wwwroot/bin/
# Expose HTTP port
EXPOSE 80