I would like to ask the Node program, how to modify the PATH variable of Windows ah? Add a variable.

specifically refers to Electron applications, but if Node can do it, it"s the same.
We have some exe files to use in the program, so we need to make sure that the environment variables are normal when the program starts, and then run these command as CMD.
are these values:

what I"m sure is that programs written in other languages can be done, but I don"t know if they can be written based on Node and how to do them.
does anyone know what to do?
Thank you.

Mar.12,2021

child_process.exec can execute instructions. But I don't know the specific instructions of windows .

official website


you can set environment variables when you start the process.


the problem has been solved. You can directly modify the value of process.env.PATH, which is valid during the startup of the program

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b37ada-2c0b8.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b37ada-2c0b8.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?