ASP.Net run VBS function

N

Nigel

Hi All,

Does anyone know if it is possible / know how to run a function in a vbs
script from a c# asp.net 2.0 page passing a variable to it and getting a
value back?

Thanks in advance.

Regards,

Nigel
 
G

Guest

System.Diagnostics.Process p = System.Diagnostics.Process.Start(@"Test.vbs",
"command line args");
p.WaitForExit();
Console.WriteLine (p.ExitCode.ToString());

Your VBScript file would use WScript.Arguments to access the command line
args passed from .NET and quit as WScript.Quit (return code). The return code
is fetched via the ExitCode propert as above.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top