2013-08-07 4 views
2

powershell을 사용하여 하나의 배치 파일을 실행하려고합니다. 실패하지 않고 APP를 시작하려면 속성 파일이 필요합니다.powershell을 사용하여 배치 파일을 실행하는 방법

다음은 시도했지만 성공하지 못한 명령입니다.

cmd.exe /c ' C:\designer\5.7\bin\designer.bat -p C:\designer\5.7\bin\designer.prop 

또는

& "C:\designer\5.7\bin\designer.exe" "C:\designer\5.7\bin\designer.prop" 

또는

& "C:\designer\5.7\bin\designer.exe" C:\designer\5.7\bin\designer.prop 

사람은 더 많은 제안 있을까요?

+0

[파워 쉘에서 배치 스크립트를 호출하는 방법?] (HTTP의 가능한 중복 : // howoverto.com/questions/4384814/how-to-call-batch-script-from-powershell) – WhiteKnight

답변

5

당신은있는 그대로 작동합니다 단지

C:\designer\5.7\bin\designer.bat -p C:\designer\5.7\bin\designer.prop 

귀하 후자의 두 가지 예를 사용할 수 있어야합니다.

0

x.vbs 파일 내용 다음

Dim oShell 
Set oShell = WScript.CreateObject ("WScript.Shell") 
oShell.run "cmd /K CD **path** & **x.bat** **parameter**" 
Set oShell = Nothing 

PowerShell 스크립트는 다음

Start-Process x.vbs 
관련 문제