-
Notifications
You must be signed in to change notification settings - Fork 905
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
msi packages fail install with "Could not find 'msiexec'" #723
Comments
Duplicate of #699 |
Not a duplicate! I will work on this now. |
Adding security to this as well - fully qualifying the PATH to msiexec. |
Related to needing #722 |
In commit cfa8e2f, we introduced introduced a check in `Start-ChocolateyProcessAsAdmin` that determines if an executable exists. Unfortunately this function doesn't try to verify if the item exists at a location on the PATH, thus breaking calls from `Install-ChocolateyInstallPackage` and `Uninstall-ChocolateyPackage` that call this function with simply 'msiexec'. We should fully qualify msiexec as a security measure, but we should also not fail on missing if msiexec is the executable we are trying to run.
Fixes released in https://chocolatey.org/packages/chocolatey/0.9.10-beta-20160506 |
@ferventcoder I get similar error code but for wusa.exe when upgrading powershell 4.0 to 5.0 on a windows 7 machine.
Could it be related? |
It is related. Expect a fix soon. |
I'm going to also shut off the failure on unfound files until we can implement search paths. |
When calling Start-ChocolateyProcessAsAdmin, wusa.exe should also use a full path so that it doesn't error on Start-ChocolateyProcessAsAdmin.
If msiexec is found, convert to full path.
Instead of errorring when not able to find a file, choco should instead pass a warning. Once we have search paths enabled like we do in c#, we can revisit this.
* stable: (doc) update CHANGELOG/nuspec (GH-728) Fix: Env var changes may require reboot (GH-729) Update env after setting env vars for scripts (GH-723) Warn when can't find file (GH-723) Convert msiexec to full path (GH-723) Ensure wusa.exe uses a full path (GH-727) Fix: Name is bad if response has params
When calling Start-ChocolateyProcessAsAdmin, wusa.exe should also use a full path so that it doesn't error on Start-ChocolateyProcessAsAdmin.
If msiexec is found, convert to full path.
Instead of errorring when not able to find a file, choco should instead pass a warning. Once we have search paths enabled like we do in c#, we can revisit this.
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 cfa8e2f introduced a check in
Start-ChocolateyProcessAsAdmin.ps1
to make sure the executable exists. ButInstall-ChocolateyInstallPackage.ps1
does not pass the full path tomsiexec
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.The text was updated successfully, but these errors were encountered: