How to automate batch command file for globally installed package?

59 Views Asked by At

Good day!, I don't know if my question is correct. but what happens here is I created my own local development environment with the portable binaries. Please see:

enter image description here

Everything is working fine except for NPM. Everytime I install a global package in NPM I first need to create a batch file to call the .cmd from the node directory.

E.g. After installing Angular CLI, I need to create a batch file pointing to the ng.cmd file. Please see: (node directory)

enter image description here

And here is my ng.bat file in the cli folder: (cli directory) enter image description here enter image description here

The reason why I did this because I don't want to mess up my windows PATH environment settings. Here is my PATH variables where I already added my cli folder:

enter image description here

Is there a way of automating these? instead of creating manually a batch file in my cli folder every time I add a new package or binaries?

Best Regards

0

There are 0 best solutions below