i'm trying to run a batch file using qt, the batch file is using nircmd.exe program and looks like this:
@echo off
nircmd setprimarydisplay 2
timeout /t 10
nircmd setprimarydisplay 1
exit
and i'm trying to run this line in QT:
QProcess::startDetached("cmd", QStringList() << "/c" << "C:\\Users\\User\\Desktop\\tmp.bat");
when i'm running my QT code it says "'nircmd' is not recognized as internal or external command, operable program or batch file."
The nircmd.exe is located in c:\windows\system32, the the computer path is detecting to the right spot.
What could be the problem?
Thanks