code: function (windowsTargetVersion, windowsPhoneTargetVersion) {
      if (process.platform !== 'win32') {
          // Build Universal windows apps available for windows platform only, so we reject on others platforms
          return Q.reject('Cordova tooling for Windows requires Windows OS to build project');
      }
  
      return getWindowsVersion().then(function (actualVersion) {
          var requiredOsVersion = getMinimalRequiredVersionFor('os', windowsTargetVersion, windowsPhoneTargetVersion);
          if ((actualVersion.gte(requiredOsVersion)) ||
              // Special case for Windows 10/Phone 10  targets which can be built on Windows 7 (version 6.1)
              (actualVersion.major === 6 && actualVersion.minor === 1 && getConfig().getWindowsTargetVersion() === '10.0')) {
              return mapWindowsVersionToName(actualVersion);
          }
  
          return Q.reject('Current Windows version doesn\'t support building this project. ' +
              'Consider upgrading your OS to ' + mapWindowsVersionToName(requiredOsVersion));
      });
  }
docs: Check if current OS is supports building windows platform
  @return {Promise} Promise either fullfilled or rejected with error message.