Changes

7-Zip

1,355 bytes added, 13:17, 6 August 2010
Added note about flawed 64bit install of 7zip
== MSI installer for use with existing older exe based installs with mixed 32-bit/64-bit hosts==
On a 64-bit host, install the 64-bit version is mandatory as more useful, because the 32-bit version on of 7-Zip doesn't integrate in the explorerWindows Explorer.
This demonstrates an interesting technique for distinguishing between 32 and 64 bit. It does have a drawback '''Warning''': The approach demonstrated below which checks the value of "PROCESSOR_ARCHITECTURE" in that when the registry is flawed for several reasons:* When you remove a the package, the 647zip-bit package x64 will never be detected as being successfully removed on 32-bit 32bit systems, (and vice versa), because the check on "PROCESSOR_ARCHITECTURE" will always return true.* When you upgrade the package and increase the revision number, WPKG will detect this and try to execute the upgrade commands even if the check statements return true! However on a 32bit host the upgrade commands of 7zip-x64 will of course always fail, as will the upgrade commands of 7zip on a 64bit host.* "''So please remember that checks are NOT there to check if a package applies to the system if the checks are true. Checks are there to verify that a package is installed properly and WPKG will run the commands over and over again until checks become true. In case of your checks they will never become true since the package will for sure not change the PROCESSOR_ARCHITECTURE or CurrentVersion value.''" (WPKG author Rainer Meier - [http://lists.wpkg.org/pipermail/wpkg-users/2010-January/006210.html wpkg-users]) A better approach is to either A) put both packages "7zip" and "7zip-x64" in your package database without the checks on PROCESSOR_ARCHITECTURE and assign "7zip" only to 32bit hosts and "7zip-x64" only to 64bit hosts, orB) create only one package that contains both the 32bit and 64bit installers of 7-Zip, and write a custom installer script that checks the operating system and installs the correct version of 7-Zip.
<source lang="xml">
Anonymous user