08-29-2025 05:14 AM
@V.Life wrote:
Out of Labview I managed to open and close the prompt window using PowerShell. Can I use the SystemExec block to launch it and execute the same commands that I tried out of Labview? Thanks.
If you would like to kill your application with PowerShell like
Get-Process | Where-Object { $_.Path -like "*MyProgram.exe" } | Stop-Process -Force
then save it as PowerShell script like KillApp.ps1, then call it from LabVIEW like
powershell.exe -ExecutionPolicy Bypass -File "Your\Path\To\KillApp.ps1"
That is:
08-29-2025 05:31 AM
Is it possible also to open the application with PowerShell? Thanks
08-29-2025 06:56 AM
@V.Life wrote:
Is it possible also to open the application with PowerShell? Thanks
Yes, of course, something like that:
Start-Process "<YOUR PATH TO PROGRAM>\MyProgram.exe" -ArgumentList "arg1"
09-01-2025 01:35 AM - edited 09-01-2025 01:53 AM
I managed to execute the script to open the .exe file but it is executed in the black window, not in the window of Power Shell, so I can't close it with the script of closure.