I have an Electron app that's bundled into a portable App so that it's a standalone '.app' on Mac OS X and '.exe' on Windows that requires no installation. On Mac OS X I can easily get the application path to determine where it is in the local file system when run. On Windows however every time I try to get the application path it returns a path within the tempdata folder rather than where the actual '.exe' file resides. Apparently it's unpacking the portable '.exe' into the temp area to run from there?
I've tried using the first argument, app.getAppPath(), app.getPath('exe'), and window.require.main.filename but they all return the same tempdata path when the app is run from a portable bundle '.exe'
Is there any way to get the original path of the actual '.exe' itself before it unpacks into the tempdata area?
I'm getting this:
but the actual .exe is launched from here at the moment: