简体   繁体   English

批处理文件中的设置与cmd.exe之间有区别吗?

[英]Is there a difference between set in a batch file and cmd.exe?

In my certain circumstance an executable I run with 在某些情况下,我运行的可执行文件

set VAR1=SOMEVAR && process.exe

Does not work. 不起作用。 However, a batch file with 但是,带有

set VAR1=SOMEVAR

works by running it like: 通过如下方式运行:

setvar.bat && process.exe

It has been verified process.exe does run in both cases. 已验证process.exe在两种情况下均可以运行。

The exe I'm using is bacwi.exe and the sourceforge page mentions 我正在使用的exe是bacwi.exe,并且sourceforge页面提到

"bvlc.bat batch file configures environment variables to use BACnet/IP port 47809 for any subsequent BACnet tools run from that command prompt window, and enables the BBMD Foreign Device Registration." “ bvlc.bat批处理文件将环境变量配置为将BACnet / IP端口47809用于从该命令提示符窗口运行的任何后续 BACnet工具,并启用BBMD外部设备注册。”

Are you aware that the first example would include the space between R and && in the value assigned, but the second would not? 您是否知道第一个示例将R和&&之间的空格包含在分配的值中,而第二个示例则没有? Given the generality of your question, and your explicit problem description does not work, you're crossing into crystal-ball territory 考虑到您问题的普遍性,而您对问题的明确描述不起作用,那么您将进入水晶球领域

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

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