Reputation: 119
I am trying to run one batch file using powershell. It required property file to start the APP as without it is failing.
Below are the commands which i have tried but dint get success.
cmd.exe /c ' C:\designer\5.7\bin\designer.bat -p C:\designer\5.7\bin\designer.prop
or
& "C:\designer\5.7\bin\designer.exe" "C:\designer\5.7\bin\designer.prop"
or
& "C:\designer\5.7\bin\designer.exe" C:\designer\5.7\bin\designer.prop
Could someone suggest more on it?
Upvotes: 2
Views: 10494
Reputation: 365
x.vbs file content following:
Dim oShell
Set oShell = WScript.CreateObject ("WScript.Shell")
oShell.run "cmd /K CD **path** & **x.bat** **parameter**"
Set oShell = Nothing
powershell script following :
Start-Process x.vbs
Upvotes: 0
Reputation: 354356
You should be able to use just
C:\designer\5.7\bin\designer.bat -p C:\designer\5.7\bin\designer.prop
Your latter two examples should work as they are.
Upvotes: 5