Windows docker container not able to install any msi files

I spun up a container on my server 2019 machine using below command.

docker run -it -v c:\data:c:\shareddata Microsoft Artifact Registry powershell

All the installers are failing, when I check the log file, I came to know windows installer service not running inside container.

But, starting it, get below error.

Set-Service –Name msiserver –StartupType "Manual"

Set-Service : Service ‘Windows Installer (msiserver)’ cannot be configured due to the following error: Access is denied
At line:1 char:1

  • Set-Service –Name msiserver –StartupType “Manual”
  • CategoryInfo : PermissionDenied: (System.ServiceProcess.ServiceController:ServiceController) [Set-Servi
    ce], ServiceCommandException
  • FullyQualifiedErrorId : CouldNotSetService,Microsoft.PowerShell.Commands.SetServiceCommand

whoami

user manager\containeradministratorIf I try direct installation of an msi, getting this error in the log.

Error 1719. Windows Installer service could not be accessed. Contact
your support personnel to verify that it is properly registered and
enabled.

I tried from the steps mentioned in this link

I am still getting the msi 1719 error.

Content from my msi log:
Error 1719. Windows Installer service co
uld not be accessed. Contact your support personnel to verify that it is properly registered and enabled

My docker file:

# escape=`
FROM mcr.microsoft.com/windows/servercore:ltsc2019

SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]


WORKDIR c:\shareddata
COPY data c:\shareddata


RUN [Net.ServicePointManager]::SecurityProtocol = 'Tls12, Tls11, Tls' 

RUN ls
RUN Start-Process 'vcredist_x64.exe' '/q /norestart' -PassThru | Wait-Process;
RUN Start-Process 'VC_redist.x64.exe' '/q /norestart' -PassThru | Wait-Process;
RUN Start-Process 'rktools.msi' '/qn /norestart /L*V "rktools.msi.log"' -PassThru | Wait-Process;

RUN get-process

SHELL ["cmd", "/S", "/C"]

I have had similar issues. Typically we get the MSI aborting with error 1603 or 1609. I definitely got further when I manually installed the VC++ runtime, but that was not required prior to applying some Windows updates. I also updated the docker enterprise engine, and that resolved it on some machines but not others. Very strange.