src/versions.js
function _getWindowsVersion () {
  return new Promise((resolve, reject) => {
    const command = 'systeminfo | findstr /B /C:"OS Name" /C:"OS Version"'
    exec(command, (error, stdout) => {
      if (error) {
        reject(error)
      } else {
        resolve(stdout)
      }
    })
  })
}
function _getWindowsVersion () {
  return new Promise((resolve, reject) => {
    const command = 'systeminfo | findstr /B /C:"OS Name" /C:"OS Version"'
    exec(command, (error, stdout) => {
      if (error) {
        reject(error)
      } else {
        resolve(stdout)
      }
    })
  })
}
function _getWindowsVersion ( ) { return new Promise ( ( resolve , reject ) => { const command = 'systeminfo | findstr /B /C:"OS Name" /C:"OS Version"' exec ( command , ( error , stdout ) => { if ( error ) { reject ( error ) } else { resolve ( stdout ) } } ) } ) }
Get the current name and version of Windows
Get the current name and version of Windows