electron get exe path

JavaScript
const basepath = require('electron').remote.app.getAppPath()

Source

Also in JavaScript: