Equivalent to export command in .bashrc in Windows?

Equivalent to export command in .bashrc in Windows?

I would like to be able to make a script in Windows and make it runnable from anywhere in the command line.

For example, if I made a script 'touch' mimicking the command from UNIX, how could I make it globally available? I saw another similar question that used the 'doskey' command, but in the answer it seemed like you would have to manually run a script each time you loaded cmd.exe to get the other scripts into the environment.

答案1

This answer uses AutoRun to run a self made script where you can set variables.

相关内容