【发布时间】:2012-09-10 19:22:16
【问题描述】:
我已经阅读了这个答案stackoverflow 答案,它让我走到了一半。这是我需要做的。
执行这个命令:
"c:\myexe.exe <c:\Users\Me\myanswerfile.txt"
如果我直接从我的 powershell 脚本中运行它
&'c:\myexe.exe <c:\Users\Me\myanswerfile.txt'
我收到此错误:
The term 'C:\myexe.exe <c:\Users\Me\myanswerfile.txt' is not recognized as the name of
a cmdlet, function, script file, or operable program. Check the spelling of the name,or
if a path was included, verif that the path is correct and try again.
现在我已经尝试了几种变体,包括将原始命令放在一个名为 $cmd 的变量中,然后传递
如果我将“
我被难住了。有什么建议吗?
【问题讨论】:
标签: powershell