 +      return [os.path.normpath(
 +          os.path.join(self.path, 'VC/vcvarsall.bat')), arg]
  
- 
  def _RegistryQueryBase(sysdir, key, value):
+   """Use reg.exe to read a particular key.

+        # VS2013 non-Express has a x64-x86 cross that we want to prefer.
         return [os.path.normpath(
-            os.path.join(self.path, 'VC/vcvarsall.bat')), arg]
+           os.path.join(self.path, 'VC/vcvarsall.bat')), 'amd64_x86']
+      # Otherwise, the standard x86 compiler.
+      return [os.path.normpath(
+        os.path.join(self.path, 'Common7/Tools/vsvars32.bat'))]

diff --git a/pylib/gyp/MSVSVersion.py b/pylib/gyp/MSVSVersion.py
index d9bfa68..32e3286 100644
--- a/pylib/gyp/MSVSVersion.py
+++ b/pylib/gyp/MSVSVersion.py
@@ -77,35 +77,34 @@ class VisualStudioVersion(object):
     assert target_arch in ('x86', 'x64')
     sdk_dir = os.environ.get('WindowsSDKDir')
     if self.sdk_based and sdk_dir:
