choco icon indicating copy to clipboard operation
choco copied to clipboard

msi packages fail install with "Could not find 'msiexec'"

Open jaredreynolds opened this issue 10 years ago • 8 comments

What You Are Seeing?

When installing an msi-based package, choco fails with "ERROR: Could not find 'msiexec'".

What is Expected?

The package installs (like it used to).

How Did You Get This To Happen? (Steps to Reproduce)

choco upgrade tortoisesvn -y (probably would fail with install as well--see comments below)

Output Log

GIST LINK

Comments

Commit cfa8e2fd9a0906e014d3e7eeff749e9bc9cd3a77 introduced a check in Start-ChocolateyProcessAsAdmin.ps1 to make sure the executable exists. But Install-ChocolateyInstallPackage.ps1 does not pass the full path to msiexec so the Exists check fails.

I was able to get around this with a temporary change to Install-ChocolateyInstallPackage.ps1 (below). I'm not sure this is how you want to approach the fix.

    $env:ChocolateyExitCode = Start-ChocolateyProcessAsAdmin "$msiArgs" "$env:SystemRoot\system32\msiexec.exe" -validExitCodes $validExitCodes

jaredreynolds avatar May 05 '16 21:05 jaredreynolds

Duplicate of #699

ferventcoder avatar May 05 '16 21:05 ferventcoder

Not a duplicate! I will work on this now.

ferventcoder avatar May 05 '16 21:05 ferventcoder

Adding security to this as well - fully qualifying the PATH to msiexec.

ferventcoder avatar May 05 '16 22:05 ferventcoder

Related to needing #722

ferventcoder avatar May 05 '16 22:05 ferventcoder

Fixes released in https://chocolatey.org/packages/chocolatey/0.9.10-beta-20160506

ferventcoder avatar May 06 '16 01:05 ferventcoder

@ferventcoder I get similar error code but for wusa.exe when upgrading powershell 4.0 to 5.0 on a windows 7 machine. chocolatey upgrade powershell

Downloading PowerShell.5.0 64 bit from 'https://download.microsoft.com/download/2/C/6/2C6E1B4A-EBE5-48A6-B225-2D2058A9CEFB/Win7AndW2K8R2-KB3134760-x64.m su' Using system proxy server 'seproxy.hm.com:8080'. Progress: 100% - Saving 20.77 MB of 20.77 MB (21779572/21779572) Download of Win7AndW2K8R2-KB3134760-x64.msu (20.77 MB) completed. Installing PowerShell.5.0... ERROR: Could not find 'wusa.exe' The upgrade of powershell was NOT successful. Error while running 'C:\ProgramData\chocolatey\lib\PowerShell\tools\ChocolateyInstall.ps1'. See log for details.

Could it be related? https://github.com/chocolatey/choco/search?utf8=%E2%9C%93&q=wusa.exe

da9l avatar May 09 '16 09:05 da9l

It is related. Expect a fix soon.

ferventcoder avatar May 09 '16 12:05 ferventcoder

I'm going to also shut off the failure on unfound files until we can implement search paths.

ferventcoder avatar May 09 '16 13:05 ferventcoder