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\temp folder rather than the actual '.exe' file
Is there any way to get the original app.exe path?
I've tried the following:
The path I'm getting from my tests:
C:\Users\xxx\AppData\Local\Temp\xxxxxx.tmp\app
the actual .exe Path (where the app launched from, and what i need):
C:\Users\XXX\Documents\test\dist
I'm just starting with Electron.
I found a solution: Use the Environment Variable (created by Electron-Builder)
process.env.PORTABLE_EXECUTABLE_DIR
to show the real Path of the App.exe. Works only packed with Electron-Builder