Skip to content
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

package resource not uninstalling MSI without source property defined #5274

Closed
jmery opened this issue Sep 2, 2016 · 6 comments
Closed

package resource not uninstalling MSI without source property defined #5274

jmery opened this issue Sep 2, 2016 · 6 comments

Comments

@jmery
Copy link

jmery commented Sep 2, 2016

Description

This works properly and uninstalls the package:

package 'ActivePerl Enterprise 5.16.3 Build 1603.4 (64-bit)' do
  action :remove
  installer_type :msi
  source 'https://s3.amazonaws.com/jmery/pepsi-poc/ActivePearl.msi'
  checksum 'e6aca518673e37606990a3db368d401dc860182a3da09a9d77770ba16f24dfe9'
  options '/q'
end

This does NOT work. The client converges and says it's uninstalling, but no action taken.

package 'ActivePerl Enterprise 5.16.3 Build 1603.4 (64-bit)' do
  action :remove
  installer_type :msi
#  source 'https://s3.amazonaws.com/jmery/pepsi-poc/ActivePearl.msi'
#  checksum 'e6aca518673e37606990a3db368d401dc860182a3da09a9d77770ba16f24dfe9'
  options '/q'
end

It appears that either the package resource or the MSI itself are not performing a /quiet uninstall. This was verified with other MSI packages from the command line (e.g. grab the MSI UninstallString from the registry and run from command prompt). Tested with the chef-client install as well with the same results.

Chef Version

chef-client version Chef: 12.13.37

Platform Version

Windows 2012 Standard x64 (note: Not 2012 R2)

Replication Case

Install the package above in the manner of your choice (I used the package resource to install). Run the above package resource code to attempt to uninstall.

The package source above is wide open for use and the checksum is valid.

Client Output

No errors reported

Stacktrace

N/A

CC @mwrock

@Shafiud
Copy link

Shafiud commented Sep 6, 2016

i don't see any difference in the code between "This works properly" Vs "This does NOT work".

@jmery
Copy link
Author

jmery commented Sep 6, 2016

source and checksum are commented on the non-working resource. Essentially, source must be specified for action :remove to work.

@lamont-granquist lamont-granquist added this to the Accepted Minor milestone Sep 14, 2016
@thommay
Copy link
Contributor

thommay commented Sep 14, 2016

@chef/client-windows please take a look…

@Aliasgar16
Copy link

@jmery I successfully reproduced this issue for package ActivePerl Enterprise 5.16.3 Build 1603.4 (64-bit). I found that chef was correctly handling the scenario (when removing the package with no source value passed) by using the uninstallString retrieved from the Windows Registry, but the uninstallString for the package ActivePerl Enterprise 5.16.3 Build 1603.4 (64-bit) itself is invalid as it contains /I option (which is used for installation) instead of /X option (which is used for un-installation). I will modify the chef code to handle such scenarios and some other similar kind of scenarios (if I found any). Will update you further.

@Aliasgar16
Copy link

Fix for this issue can be tracked here.

@btm
Copy link
Contributor

btm commented Oct 27, 2016

Fixed by #5394

@btm btm closed this as completed Oct 27, 2016
@chef chef locked and limited conversation to collaborators Nov 16, 2017
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

7 participants