I need some help. I am creating a deployment tool which works in Windows and the goal is to generate deliverables for a variety of platforms. I want to run the powershell script to call the python scripts prepared with Codesys script engine API. I used start-process cmdlet like
$ImportResult = Start-Process -FilePath "path of CoDeSys.exe" -ArgumentList '--Profile="our codesys profile"', '--runscript="Testme.py"'
I need the return value from this execution to make further decisions down the sequence.
I see nothing when I print the $ImportResult.
The code of Testme.py is:
from future import print_function
print("Hi Codesys ! I am being tested ")
I guess the python might return 1 but not Codesys.exe ....Here the Codesys window does not close.
I tried with --noUI as well...Here as well I dont read the return value. $Lastexitcode also did not help
I would be glad to see a powershell script reading the exitcode of the python script which does a set of actions in codesys.
Log in to post a comment.