I have an Portable Electron App (packed with: electron-builder + asar, portable build) on Windows. I try to get the application path but it returns a path within the user\\t
I had a lot of trouble with this and was finally able to solve the issue by replacing __dirname by '.', see working example below :
const path = require('path') const myAppPath = path.resolve('.', 'myapp.exe');