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
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?
If you understand what you're doing, you're not learning anything.
*rofl-like-a-little-girl*Originally Posted by itsme86
Good class architecture is not like a Swiss Army Knife; it should be more like a well balanced throwing knife.
- Mike McShaffry
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.