I have a .exe file with a change directory command as follows:-
set test="C:\Program Files"
cd /d %test%
so i need to execute this .bat file using QScriptEngine.I know this can be achieved through QProcess.But i need to execute using QScriptEngine.I need to set the variable "test" to engine first and then i need to execute the command.On seeing the docs i used the following code:-
QScriptEngine engine;
QScriptValue result = engine.evaluate("D:/Moses/test.bat");
qDebug() << result.isError();
The out here is true.So some how first i need to set variable test to engine and then evaluate the .bat file.
Bookmarks