Windows Application 32 bit COM dll registration

I have a very large WinForms application that i would like to deploy via docker.
The application is composed of hundreds of COM dlls that require registration.
The application is also composed of many .NET assemblies on Framework 4.62. Some of which also require COM registration.
The application needs access to remote and/or local file storage as well and SQL server. Assumption is that SQL Server is managed by the host OS as i do not plan to include it in a container.

How do I deploy COM dlls in a Container that need to be registered ?
Please point me to any resources that would be helpful based on the information above.

Thank you

Windows GUI applications cannot run in containers, as of today. So containerizing your WinForms app may not be worth the effort, especially because it also involves 32-bit COM dlls.

That said, if you were containerizing a non-GUI service type of application, registering 32-bit COM dlls in containers is the same as registering them on regular Windows. Start from the microsoft/windowsservercore image, and use %WINDIR%\syswow64\regsvr32.exe.

Example Dockerfile:

FROM microsoft/windowsservercore
COPY your32bitCOM.dll C:\SomeDirectory\your32bitCOM.dll
RUN %WINDIR%\syswow64\regsvr32.exe C:\SomeDirectory\your32bitCOM.dll

I have same problem but Not working when I tried with following code:

FROM microsoft/windowsservercore
COPY your32bitCOM.dll C:\SomeDirectory\your32bitCOM.dll
RUN %WINDIR%\syswow64\regsvr32.exe C:\SomeDirectory\your32bitCOM.dll

You need to add /S to regsvc32.exe since EXE shows UI at the end of registration and it hangs at that point

According to my knowledge there is no need to add /S because RUN command already added /S while executing any command.

Same issue as above link given below

Issue on github(Microsoft iis-docker )

Dear Friends,
Is there any permanent solution for this problem. I have tried most of the solutions found in the internet to register my third party DLLs in the windows registry. But nothing helps.
my current docker file as below.


FROM microsoft/windowsservercore
FROM microsoft/iis
SHELL [“powershell”, “-command”]

RUN md c:\RASS;

COPY .\revass\DLL\RevAssDataSource.dll C:\RASS\DLL\RevAssDataSource.dll

RUN C:\Windows\SysWOW64\regsvr32.exe /S C:\RASS\DLL\RevAssDataSource.dll

Can anyone please help me.

Thanks in advance.

Sajitha Chandran

Dear All,
The ongoing issue with third party DLL registration got resolved.

  1. First of all, I had to copy a dll “msvbvm60.dll” to the DLL folder to copy to the containers. So with out this DLL, the other DLLs will not get registered. The “msvbvm60.dll” can be found in c:\windows\syswow64\msvbvm60.dll folder of your local machine.
  2. Another issue was vbrun60sp6.exe need to start before moving the DLLS. vbrun60sp6.exe is another important component for the third party DLLs to get registered.
    So the third party registration in the docker file would look like below.

RUN Start-Process c:\dll\vbrun60sp6.exe -Wait; Start-Process c:\Windows\SysWOW64\regsvr32.exe -ArgumentList '/s', "c:\dll\ErrMngr.dll -Wait;

Let me know if this helps anyone.

Now I am facing another issue. To enable windows authentication, we need to configure gMSA. I do not have any idea about the gMSA configuration. From google I am finding that we need to have min win 2012 server to do that. So cant we implement gMSA on local machine? and if possible, what are the steps to do so. Please suggest.

Thanks and Regards,
Sajitha Chandran

1 Like

Make sure the command is being run from a 64-bit process (or a 64-bit cmd.exe console window). Otherwise, the %windir%\System32\regsvr32.exe command will be redirected to %windir%\SysWoW64\regsvr32.exe and a 32-bit regsrv32 will be run ttrockstars (which can’t register 64-bit DLLs).

You could also try using %windir%\sysnative\regsvr32.exe which will redirect to the real %windir%\System32\ directory (but only from a 32-bit process, so if you use that take care to make sure no one tries to run the command from a 64-bit process).

I tried using vbrun60sp6.exe as well as copying msvbvm60.dll to both the directory where my com application is located as well as SysWOW64. It had no effect, registration still silently fails.
Trying System32 instead of SysWOW64 didn’t help, either.

Is there any update on this issue? I am trying to register a 32 bit ocx file on a Windows container. Although the command regsvr32 “myfile.ocx” gets executed, it doesnt seem to register. Is there a workaround for this?

Any update on this ?

Also have the same issue using servercore:ltsc2019. The workaround listed in this topic does not work. The vbrun60sp6.exe process never ends even when ran in quiet mode. Is there any way to do this ? We are trying to convert a legacy desktop application to use in containers. We dumped the UI part and kept only the “services” part but regsvr32.exe /S silently fails.

this is working on my end
Kindly try

Start-Process c:\setup\com+\vbrun60sp6.exe;

Start-Process -Wait regsvr32 -ArgumentList “c:\Windows\System32\MSVBVM50.dll”,"/s";
Start-Process -Wait regsvr32 -ArgumentList “c:\Windows\System32\MSVBVM60.dll”,"/s";

Confirm that works!

The msvbvm60.dll is not required, at least it works without that dll for me, vbrun60sp6.exe does the major patches. I have following files in my working directory:


My Dockerfile:



COPY ./L1CPN01.dll ./
COPY ./vbrun60sp6.exe ./

RUN vbrun60sp6.exe
RUN regsvr32 ./L1CPN01.dll /s

Here is trace from my docker build command:

docker build .
Sending build context to Docker daemon  2.544MB
Step 1/6 : FROM
 ---> 8d10d9ac2cbe
Step 2/6 : WORKDIR /app
 ---> Using cache
 ---> ccbcb5f1e3d3
Step 3/6 : COPY ./L1CPN01.dll ./
 ---> Using cache
 ---> 0f5da7ba8fbc
Step 4/6 : COPY ./vbrun60sp6.exe ./
 ---> ae2f485b0f23
Step 5/6 : RUN vbrun60sp6.exe
 ---> Running in 43b8f3a7ec33
Removing intermediate container 43b8f3a7ec33
 ---> a14d517236da
Step 6/6 : RUN regsvr32 ./L1CPN01.dll /s
 ---> Running in 4d197284c9d9
Removing intermediate container 4d197284c9d9
 ---> 63434f170bb4
Successfully built 63434f170bb4

May I know where I can download the file vbrun60sp6.exe?