From VB.net we can execute VBScript code by using following line:
System.Diagnostics.Process.start("AbsolutePathofVBScriptfile")
But how can one call a specific function present in vbscript from VB.net code?
I searched for that but couldn’t figure it out. Some things I found were IActiveScript, MSScript.ocx…
I’m not sure that this can be done, as you are operating in two totally different domains.
That line of code you present does nothing different than if you double-clicked the vbscript file.
I’ve done next to no vbscript programming, but what about this… Create another script file (stub) that does nothing but call a function (subroutine) in your main, library file. Then, invoke the stub from the VB.net application.
library.vbs
stub.vbs
VB.net
Functions, Subroutines, and How to Call Them From Other Scripts