Command Prompt - How to add a set path only for that batch file executing?

前端 未结 3 1636
北海茫月
北海茫月 2020-11-30 18:02

Basically, I know I can go through my control panel and modify the path variable. But, I\'m wondering if there is a way to through batch programming have a temporary path in

3条回答
  •  北海茫月
    2020-11-30 18:09

    That's right, but it doesn't change it permanently, but just for current command prompt, if you wanna to change it permanently you have to use for example this:

    setx ENV_VAR_NAME "DESIRED_PATH" /m
    

    This will change it permanently and yes you can overwrite it by another batch script.

提交回复
热议问题