![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | how to execute a batch file with arguments from powershell hi, I have a particular requirement which dictates that i need to execute the batch file from powershell Script. Not only this but the script executes and passes some data to the batch file and then the batch file will execute by taking the parameters passed to it. All this goes in a loop and the calling the batch file with arguments is also in the loop. Thanks, Aditya |
My System Specs![]() |
| | #2 (permalink) |
| | Re: how to execute a batch file with arguments from powershell "AdityaKir" <AdityaKir@xxxxxx> wrote in message news 5C38E39-C0D9-4AFE-A8B9-481E4CF98271@xxxxxxQuote: > hi, > > I have a particular requirement which dictates that i need to execute the > batch file from powershell Script. Not only this but the script executes > and > passes some data to the batch file and then the batch file will execute by > taking the parameters passed to it. All this goes in a loop and the > calling > the batch file with arguments is also in the loop. > > Thanks, > > Aditya Here's an example .... PS (1) > & "C:\temp\a.bat" "hello" "world" hello world PS (2) > where a.bat contains .... @echo off echo %1 echo %2 -- Jon |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Batch file to execute files in subfolders | PowerShell | |||
| How to execute a batch file on startup? | Vista General | |||
| Running batch file from Powershell script | PowerShell | |||
| Call powershell script via Batch-File | PowerShell | |||
| powershell arguments : PARAM vs ARGS ? | PowerShell | |||