const { execSync } = require('child_process');

const path = require('path');

const getDevicesId = () =>  execSync(path.join(__dirname, './check.exe getDevicesId')).toString('utf-8').trim()

const regeditKey = (devicesId, code) =>   execSync(path.join(__dirname, `./check.exe regeditKey ${devicesId} ${code}`)).toString('utf-8').trim()

const validate = () => execSync(path.join(__dirname, './check.exe validate')).toString('utf-8').trim()

const getcode = () => execSync( path.join(__dirname, './check.exe getKey 3521-7131-4413-5051')).toString('utf-8').trim()


module.exports = {
    getDevicesId,
    regeditKey,
    validate
}