参见英文答案 >
Setting a system environment variable from a Windows batch file? 6个
如何在批处理脚本中声明全局变量?
如何在批处理脚本中声明全局变量?
例:
Test1.bat:
set testvar=C:\Windows echo %testvar%
现在我应该可以在其他批处理脚本中使用此testvar(test2.bat)
Test2.bat:
echo %testvar%
感谢致敬!