I need to call a .bat file from a powershell script synchronously.
I am currently working on a utiity where I need to call a .bat file to generate data in an excel sheet , use powershell script to extract parts of that data and then call .bat file again to processs the extracted data however when the script runs, complete powershell script is executed first and calls to .bat files are made later.
Code snippet:
echo "Hello world"
Start-Process C:/dataloader/bin/process.bat -ArgumentList $tempLibraryPath ExtractTest
Echo "Foobar"
expected output: Hello world call process.bat Foobar
Actual output Hello World Foobar Call process.bat