Is it possible to find a exe without path in an electron app?



I got a small app and it opens games, files or programs on a button click, but i can only open the files when i give a specific path like this example here using steam:

function steam() {
shell.openExternal('C:\\Program Files (x86)\\Steam\\Steam.exe')


Is there a way that other user can add their path (just like discord) or that it searches the system for the exe etc. ?


If the executable is in a folder on your system PATH, the only thing you need to send to the shell is steam and it will locate the first file by that name in all the PATH folders. This is true on every operating system I know of.


If i understand this right, it would be

function steam() {

or am i wrong?


Looking at it, I would expect that to work.


It sadly doesn’t


If you share a repo with your code, I could experiment a little when I get time.