Details
-
Bug
-
Resolution: Incomplete
-
Not Evaluated
-
None
-
5.15.0 RC2
-
None
Description
Hello everyone,
I need to run a PowerShell script via a QProcess. The script is correct and its output is in JSON format even when an error occours. I wrote an example project to try that but It crashes in QProcess::start().
The script has 4 sections. If I eliminate section 2 or section 3 to short the script the execution succedes. I also tried running longer scripts and they worked, hence the script length is not the problem.
In the example project I tried two way of running the script. Mode 1 runs the script from the main thread whereas mode 2 runs the script from a worker thread but the results are the same.
Run mode can be selected in MainQ::MainQ().
The script is ComputersAndUsers.ps1 but has been minified and inserted in the source code as macro. In MainQ.cpp there are several macro COMPUTERSANDUSERS_PS1* used for testing purposes.