ASP.Net run VBS function

Discussion in 'ASP .Net' started by Nigel, Aug 10, 2007.

  1. Nigel

    Nigel Guest

    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
     
    Nigel, Aug 10, 2007
    #1
    1. Advertising

  2. 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.

    "Nigel" wrote:

    > 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
    >
    >
    >
     
    =?Utf-8?B?U2l2YSBN?=, Aug 10, 2007
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Brad

    Running a VBS file from ASP.NET

    Brad, Aug 28, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    534
  2. Alex
    Replies:
    1
    Views:
    2,638
    Alvin Bruney [MVP]
    Feb 16, 2004
  3. Colin Steadman

    Special Permission for IWAM or IUSR to run VBS File?

    Colin Steadman, Apr 5, 2004, in forum: ASP General
    Replies:
    1
    Views:
    278
    Colin Steadman
    Apr 7, 2004
  4. ben h

    .vbs function in an .asp page?

    ben h, Sep 13, 2004, in forum: ASP General
    Replies:
    1
    Views:
    192
    Dave Anderson
    Sep 13, 2004
  5. Dimple

    run VBS files with ASP

    Dimple, Apr 11, 2005, in forum: ASP General
    Replies:
    1
    Views:
    292
    Ray Costanzo [MVP]
    Apr 11, 2005
Loading...

Share This Page