【发布时间】:2022-01-14 14:35:58
【问题描述】:
这里的一般问题,想知道我是否能够从批处理中获取变量并将它们转换为实际的 C 变量,例如:
%ComputerName%
然后将其放入 C 中的 var 中
char = computername thing
想知道有没有可能
【问题讨论】:
-
检查
getenv()函数 -
yourexe.exe %computerName%...并且,在你的程序中使用argc和argv。 -
我去看看
标签: c batch-file variables