Skip to content
This repository has been archived by the owner on Feb 19, 2019. It is now read-only.

[BUG] Uninstall-ChocolateyPackage.ps1 does not use the msifile #286

Closed
DennisHarper opened this issue May 1, 2013 · 12 comments
Closed

[BUG] Uninstall-ChocolateyPackage.ps1 does not use the msifile #286

DennisHarper opened this issue May 1, 2013 · 12 comments

Comments

@DennisHarper
Copy link

The msi file is never set as an arguement when trying to uninstall. Thus, when msiexec is called, it is just passed /x as well as any other flags, but the file is never passed.

The symmetrical code can be used as an example (Install-ChocolateyInstallPackage.ps1):
Line:58
if ($fileType -like 'msi') {
$msiArgs = "/i "$file""

However, Uninstall-ChocolateyPackage.ps1 has:
Line: 50

if ($fileType -like 'msi') {
$msiArgs = "/x"

@ferventcoder
Copy link
Contributor

Thanks for reporting this!

DennisHarper pushed a commit to DennisHarper/chocolatey that referenced this issue May 1, 2013
@rismoney
Copy link
Contributor

rismoney commented May 1, 2013

@ferventcoder - i left that out intentionally, because I left it to the package author.
Not every package uninstalls via filename.

Uninstall-ChocolateyPackage '7zip' 'msi' '{23170F69-40C1-2702-0920-000001000000} /norestart /qn'

Our oldest PR, actually can use the learned guid, so the author doesn't need to specify it... :)

@ferventcoder
Copy link
Contributor

Our oldest PR is older than my youngest child. x)

@PaulMead
Copy link

PaulMead commented Jan 7, 2014

So what is the correct way to use this helper for MSI's then? Currently with v0.9.8.23 of Chocolatey, using something like : Uninstall-ChocolateyPackage $packageName $fileType $silentArgs "$url"
Fails as the command it generates is of the form:
MSIEXEC /x $silentArgs $url
But should be
MSIEXEC /x $url $silentArgs

Have I missed something with regards to how this helper should be used?

@gep13
Copy link
Member

gep13 commented Jan 7, 2014

@ferventcoder
Copy link
Contributor

@ferventcoder
Copy link
Contributor

@PaulMead It could be a bug in the helper.

@gep13
Copy link
Member

gep13 commented Jan 7, 2014

@ferventcoder This is a known issue, that I need to figure out. Some testing required here.

@ferventcoder
Copy link
Contributor

:)

@rismoney
Copy link
Contributor

rismoney commented Jan 8, 2014

@ferventcoder are you referring to HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall

@PaulMead
Copy link

PaulMead commented Jan 8, 2014

@gep13 Thanks for the help, the second method you suggested worked for the msi

@ferventcoder
Copy link
Contributor

This has been moved over to choco - chocolatey/choco#229

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants