i was tring to run some of my vbs scripts from a c++ program using system
i had no luck does anyone know a alternitive way of doing this
Printable View
i was tring to run some of my vbs scripts from a c++ program using system
i had no luck does anyone know a alternitive way of doing this
CreateProcess()?
It would help to know exactly what "had no luck" actually means. Compile errors? Runtime errors? Your computer caught fire? Bush was re-elected again?
*rofl-like-a-little-girl*Quote:
Originally Posted by itsme86
:D
This should do the trick:
If you wish to run your script as GUI (with message boxes) rather than on the console, you can use wscript. There are several options available with cscript which you can discover by typing "cscript /?" on the command line.Code:system("cscript \"C:\\Path\\To\\Your Script.vbs\"");
As itsme86 said, CreateProcess can be a better option than using system. In this case the executable would be cscript and the command line would be as above.