Thanks, Julian. There must be some way to do it, because I'm pretty sure Puppet handles this (they demoed installing and then updating Notepad++ for us anyway). Here is its uninstall key:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Notepad++]
"DisplayName"="Notepad++"
"Publisher"="Notepad++ Team"
"VersionMajor"="6"
"VersionMinor"="66"
"MajorVersion"="6"
"MinorVersion"="66"
"UninstallString"="C:\\Program Files (x86)\\Notepad++\\uninstall.exe"
"DisplayIcon"="C:\\Program Files (x86)\\Notepad++\\notepad++.exe"
"DisplayVersion"="6.6.6"
"URLInfoAbout"="http://notepad-plus-plus.org/"
So DisplayVersion and several other version keys could be used rather than the DisplayName. DisplayVersion seems to be relatively consistent across installations I've made.
Thinking about how to handle this... do I check for the existence of the Notepad++ key, and if it exists and matches the old version, change the display name? That might trick Chef into seeing the version's different and installing it.
Arthur Penn,
Samtec New Albany
www.samtec.com
Tel: 812-981-8351
Fax: 812-981-4359
-----Original Message-----
From: Julian C. Dunn [mailto: "> ]
Sent: Tuesday, August 5, 2014 11:59 PM
To: ">
Subject: [chef] Re: windows_package for Notepad++ not updating
On Mon, Aug 4, 2014 at 5:04 AM, Arthur Penn < "> > wrote:
> I have a resource defined to install Notepad++ as follows:
>
> windows_package "Notepad++" do
> source
> 'http://download.tuxfamily.org/notepadplus/6.6.7/npp.6.6.7.Installer.exe'
> action :install
> end
>
> When I first deployed this, the NPP version was 6.6.6. After updating
> the source to 6.6.7 I noticed that it deployed 6.6.7 correctly to new
> nodes but did not update the nodes to which it had deployed 6.6.6. I
> believe the registry key used by NPP being simply “Notepad++” without
> the version number is the reason for the failure to update. Am I
> correct? Is there a solution for getting the update performed?
This is where Windows' not having a real native package manager really stinks. There's no uniform way to to do it.
I imagine you could inspect the registry to see what version of
Notepad++ was installed, if the registry stores that information, and
attempt to do something based on that.
- Julian
--
[ Julian C. Dunn < "> > * Sorry, I'm ]
[ WWW: http://www.aquezada.com/staff/julian * only Web 1.0 ]
[ gopher://sdf.org/1/users/keymaker/ * compliant! ]
[ PGP: 91B3 7A9D 683C 7C16 715F 442C 6065 D533 FDC2 05B9 ]
Archive powered by MHonArc 2.6.16.