QProcess unable to open .vbs file !!
-
Am trying to open a .vbs file using startDetached() ; of QProcess.....its not opening the file...whereas it is able to open the batch file which lies in same working directory ...Please Help :)
-
How should QProcess know how to run the file? It is a binary executable? If not, you need to specify an application that can open it.
-
Can you suggest me a way to open a .vbs file in the working directory from the Qt application?
-
I do not know what a .vbs file is.
-
its just a Visual Basic script.....if i give a system() command from code to execute the file it does the work...but don't want to use system() function...
-
Visual Basic needs to have some interpreter somewhere, I imagine. You need to run that interpreter and pass the file as an argument. I'm not using VB so I can't really say anything more constructive. Or switch to a decent scripting language like Python, Lua, bash, etc.
-
Actually i have to run a batch file that open cmd....so i am using a Vbscript to silently open the batch file without opening the cmd. But for opening the .vbs file even i am bound to use system() if it doesn't open with QProcess.
-
You can open cmd silently with QProcess, AFAIK. But I'm not a Windows guru, so I can't be sure. As in many other situations, those things are quite easy in Unix.
-
its ok ...thanks for the help....looking on for more replies :)