How to append values to the PATH environment variable in NodeJS?
Run your script with the admin permission:
- Open cmd or PowerShell with admin
- Run
node your_script.js
- To append
PATH
variable, you can set value is :%PATH%;your_new_value here
(%PATH%
get old value)
If you run with electron app, you should require admin permission.
Don't forget setx
run on window