【发布时间】:2013-07-07 04:53:09
【问题描述】:
我需要从 powershell 脚本启动一个进程并传递这样的参数: -a -s f1d:\some directory\with blanks in a path\file.iss 为此,我编写了以下代码:
$process = [System.Diagnostics.Process]::Start("$setupFilePath", '-a -s -f1"d:\some directory\with blanks in a path\fileVCCS.iss"')
$process.WaitForExit()
因此进程开始但最后一个参数:-f1d:\some directory\with blanks in a path\file.iss 没有正确通过。请帮忙
【问题讨论】:
-
尝试使用
Start-Processcmdlet。Start-Process -FilePath "yourPath" -ArgumentList "arg1 arg2" -
尝试但没有成功。能举个例子吗?
标签: powershell command-line command-line-arguments