Raymond Brugger
Raymond Brugger

Reputation: 11

Dockerfile and MSI installation

I'm trying to install an application that is an MSI file during the build process of an image with Dockerfile.

I can get the MSI to install properly when I enter a PowerShell session on the container by running:

C:\Windows\Syswow64\msiexec.exe /i "C:\Folder\File Name with spaces.msi" /qn /l*v "C:\log.log"

I have tried everything I can think with various RUN commands using powershell and cmd in the dockerfile.

Anyone have any ideas if this is just a matter of properly escaping quotes or the spaces?

Thanks,

Upvotes: 1

Views: 1510

Answers (1)

Narendra Sharma
Narendra Sharma

Reputation: 682

Using powershell you can install msi file using below piece of code.

$msiPath = "your msi file path"
 $arguments = "/i `"$msiPath`" /quiet"
 Start-Process msiexec.exe -ArgumentList $arguments -Wait

Use same quotes

Upvotes: 2

Related Questions