Get executable APP name in main.js for portable
See original GitHub issueI see that process.env.PORTABLE_EXECUTABLE_DIR
will return executable dir, but how can I get full app name, assume some users would change that app name?
I want to toggle shortcut and startup, which will need dir and app name, C:/Users/${user}/AppData/Local/Temp
is not useful since it will change every time.
System::Call 'Kernel32::SetEnvironmentVariable(t, t)i ("PORTABLE_EXECUTABLE_DIR", "$EXEDIR").r0'
It only sets PORTABLE_EXECUTABLE_DIR
.
Issue Analytics
- State:
- Created 5 years ago
- Comments:16 (9 by maintainers)
Top Results From Across the Web
How to get the original path of a portable Electron app?
Is there any way to get the original app.exe path? I've tried the following: app.getAppPath(); __dirname; require.main.filename; app-root-path ...
Read more >How to create an executable (.exe) file from JavaScript code ...
In this lesson, we are going to learn how to create a .exe binary executable file from JavaScript code. This is possible with...
Read more >How to get the name of the current executable in C#?
There are several ways to get the name of the current executable in C#. Using System.AppDomain −. Application domain provides isolation ...
Read more >Build an Electron App in Under 60 Minutes - YouTube
In this video we will build a desktop application using Electron. js which allows us to build desktop apps using only JavaScript.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
For anyone else who finds this- I found that using
process.execPath
works. I was using an exe built by electron-packager, but not a portable one.@Cefold Please try 20.27.1