I have a VBScript that's working fine. I have a C# program that can run the VBScript with the cscript program.
What I want to do is embed the VBS in a C# exe so it is one single file and be able to run the VBS file. Is there any way for me to pass the embedded VBScript file to cscript as an argument or some other way to run an embedded VBS file?
MSScriptControlused in L.B.'s answer is only available in 32bit, the proper way to do it today, would probably be viaIActiveScript. See stackoverflow.com/questions/7491868/… (c++ question, use e.g. CsWin32 to use the APIs via c#) and blog.magerquark.de/….