[chef] RE: Re: RE: Re: windows_package for Notepad++ not updating


Chronological Thread 
  • From: Arthur Penn < >
  • To: " " < >
  • Subject: [chef] RE: Re: RE: Re: windows_package for Notepad++ not updating
  • Date: Thu, 21 Aug 2014 11:52:06 +0000
  • Accept-language: en-US

Thanks, Takehiro. I did add that ‘/S’ switch as well as the custom installer type, but it still does not seem to be updating existing installations. The windows_package recipe does not detect the changed version of Notepad++.  Notepad++ will indeed allow an administrative user to update the app when you run the app, but I was hoping to have Chef keep the version current for me. I think this is going to require either an improvement to the way windows_package works or me doing something to change the registry entries for Notepad++ to trick it into seeing the version is different.

 

 

From: Takehiro Takahashi [mailto:
Sent: Tuesday, August 19, 2014 9:23 PM
To:
Subject: [chef] Re: RE: Re: windows_package for Notepad++ not updating

 

For notepad++, you can use "/S", and it'll auto-update the software for you.

Specify something other than msi, installshield, nsis or inno as installer_type in your recipe.

(I usually use 'custom' for non-msi ones)

 

Example:

windows_package "Notepad++" do

      installer_type :custom

      options "/S"

      action :install

 end

 

 

A bit of detail on what's happening inside Windows:

When you start an installer executable, Windows Installer (a component inside Windows) scans the registry and looks for two attributes provided in the installer executables: UpgradeCode and ProductCode.

It's quite counter-intuitive, but Windows uses UpgradeCode to identify one package is the same product (upgrade path exists) as another.

ProductCode is guaranteed to be unique (with an exception with different language set up) within the machine, 
but it's perfectly valid (and happens all the time) for one software to have different ProductCode with the same UpgradeCode. (hence upgradable)

However, the GUID you see in HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\ are ProductCodes.

 

If you're really interested the detail, 

 

 

Cheers,

-tak

 

 

On Tue, Aug 19, 2014 at 4:50 AM, Arthur Penn < " target="_blank"> > wrote:

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




……………………………………………………………………………………………………………………………………………………………………
Arthur Penn
Samtec New Albany
Office: 812-981-8351   | Fax: 812-981-4359 | +1-800-726-8329
www.samtec.com

 

-----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.

§