chef / knife-windows

Plugin for Chef's knife tool for working with Windows nodes
Apache License 2.0
152 stars 110 forks source link

Fix for architechture detection issue for 64 bit #384

Closed dheerajd-msys closed 8 years ago

dheerajd-msys commented 8 years ago

During knife windows bootstrapping of windows 64 bit machine using ssh protocol, the code is not able to determine the architecture properly, PROCESSOR_ARCHITECTURE value returns x86(32bit) instead of AMD64(64 bit). The behaviour is due to WOW64, added more validation to detect the architecture properly.

Following are values for various scenarios:-

    Environment Variable         | 32bit Native | 64bit Native  |  WOW64
    PROCESSOR_ARCHITECTURE       |   x86        |    AMD64      |  x86
    PROCESSOR_ARCHITEW6432       | undefined    |   undefined   |  AMD64

Reference:- https://blogs.msdn.microsoft.com/joshwil/2004/03/11/as-promised-what-is-the-wow64-and-what-does-it-mean-to-managed-apps-that-you-run-on-64bit-machines/

mwrock commented 8 years ago

:+1:

btm commented 8 years ago

:+1:

charlesjohnson commented 8 years ago

Closes #382 .