Search code examples
windowspowershellpowershell-2.0powershell-3.0

msi installation throwing 1639 as exit error code for msi having space between characters


I have some msi like "A B C.msi" , When i am trying to install it using powershell it is throwing exit code error as 1639.

When i rename the msi to "ABC.msi" without space , installation is getting good. How to get rid of space thing . I do not want to rename the msi . Please sugegst .

Start-Process -FilePath msiexec -ArgumentList /i,<path>,/quiet -PassThru -Wait

Solution

  • Looks like the path parameter is not correct.

    Would you please try:

    Start-Process -FilePath msiexec -ArgumentList /i,'<path>',/quiet -PassThru -Wait
    

    (or maybe try "")

    See Start process with args which contains a path with blanks

    Edit Since previous method doesn't work, my last try would be:

    $pathToMSI = "c:\downloads\a b c.msi"
    Start-Process -FilePath msiexec -ArgumentList '/i',"`"$pathToMSI`"","/quiet" -PassThru -Wait