简体   繁体   English

使用cmd中的特定环境设置启动程序

[英]Launch program with specific env settings from cmd

So, if using bash, I might do something like: 因此,如果使用bash,我可能会做类似的事情:

HTTP_PROXY=http://my.proxy.com:8080 ./some_app

and the app would launch and use the proxy I've specified. 然后该应用将启动并使用我指定的代理。 Is there any way to do this kind of thing with CMD on Windows? 有什么方法可以在Windows上使用CMD进行此类操作吗?

Yes. 是。

 SET HTTP_PROXY=http://my.proxy.com:8080
 .\some_app

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM