How does Atom App add environment variable in Windows?


#1

We are working on an electron app that needs to run some .exe file.
We can delivery these files within the app, but in order to call theme using CMD, we have to set the environment variable in the system.

Right now, we are still struggle to find out how to do this on Windows. (not started for Mac yet)
We found Atom has already done this, it add variable like this into the Path:

We’d like to know how Atom did this?
Thank you very much.