diff --git a/lib/agent.js b/lib/agent.js index bb495d1b..803a8a1a 100644 --- a/lib/agent.js +++ b/lib/agent.js @@ -165,7 +165,8 @@ const PageantAgent = (() => { const RET_ERR_BINSTDOUT = 14; const RET_ERR_BADLEN = 15; - const EXEPATH = resolve(__dirname, '..', 'util/pagent.exe'); + const RAWPATH = resolve(__dirname, '..', 'util/pagent.exe'); + const EXEPATH = RAWPATH.includes('app.asar') ? RAWPATH.replace('app.asar', 'app.asar.unpacked') : RAWPATH; const ERROR = { [RET_ERR_BADARGS]: new Error('Invalid pagent.exe arguments'), [RET_ERR_UNAVAILABLE]: new Error('Pageant is not running'),