execute program on web server

Discussion in 'ASP .Net' started by Kevin O'Brien, Feb 23, 2007.

  1. Hey guys,

    I have a button that when clicked I want it to execute a program on the web
    server and not on the client machine. Can someone please tell me how this
    is done?

    Thank you,
    Kevin
     
    Kevin O'Brien, Feb 23, 2007
    #1
    1. Advertising

  2. Hello Kevin O'Brien,

    And where is your button located? If on client then u need to send the message
    to server (any possible way, IPC, WebService and etc) informing that u need
    to start sever app

    ---
    WBR, Michael Nemtsev [C# MVP].
    My blog: http://spaces.live.com/laflour
    Team blog: http://devkids.blogspot.com/

    "The greatest danger for most of us is not that our aim is too high and we
    miss it, but that it is too low and we reach it" (c) Michelangelo

    K> Hey guys,
    K>
    K> I have a button that when clicked I want it to execute a program on
    K> the web server and not on the client machine. Can someone please
    K> tell me how this is done?
    K>
    K> Thank you,
    K> Kevin
     
    Michael Nemtsev, Feb 23, 2007
    #2
    1. Advertising

  3. Kevin O'Brien

    bruce barker Guest

    in your server onclick routine use the Process class.

    note: the program must be a command line program (run without creating a
    window)

    -- bruce (sqlwork.com)

    Kevin O'Brien wrote:
    > Hey guys,
    >
    > I have a button that when clicked I want it to execute a program on the web
    > server and not on the client machine. Can someone please tell me how this
    > is done?
    >
    > Thank you,
    > Kevin
    >
    >
    >
     
    bruce barker, Feb 23, 2007
    #3
  4. Hey guys,

    I am trying to execute a batch file and getting a script error.

    This works great :
    System.Diagnostics.Process.Start("notepad.exe")

    But this gives me an error:
    System.Diagnostics.Process.Start("d:\batch\myalert.bat
    test_message 4 Open")

    It works fine from the command line.

    Thank you,
    Kevin



    "bruce barker" <> wrote in message
    news:%...
    > in your server onclick routine use the Process class.
    >
    > note: the program must be a command line program (run without creating a
    > window)
    >
    > -- bruce (sqlwork.com)
    >
    > Kevin O'Brien wrote:
    >> Hey guys,
    >>
    >> I have a button that when clicked I want it to execute a program on the
    >> web server and not on the client machine. Can someone please tell me how
    >> this is done?
    >>
    >> Thank you,
    >> Kevin
    >>
    >>
     
    Kevin O'Brien, Feb 24, 2007
    #4
  5. Kevin O'Brien

    Gozirra Guest

    > But this gives me an error:
    > System.Diagnostics.Process.Start("d:\batch\myalert.bat
    > test_message 4 Open")


    Assuming that "test_message 4 Open" are all supposed to be command-
    line arguments you must call start as -
    System.Diagnositcs.Process.Start("d:\batch\myalert.bat", "test_message
    4 Open")

    As you are calling it now, the first argument is what needs to be
    run. The extra command line arguments are not seen as arguments but
    as part of the program name. Check MSDN if you need more detailed
    help.
     
    Gozirra, Feb 25, 2007
    #5
  6. That did it!

    Thank you very much Gozirra.

    Kevin



    "Gozirra" <> wrote in message
    news:...
    >> But this gives me an error:
    >> System.Diagnostics.Process.Start("d:\batch\myalert.bat
    >> test_message 4 Open")

    >
    > Assuming that "test_message 4 Open" are all supposed to be command-
    > line arguments you must call start as -
    > System.Diagnositcs.Process.Start("d:\batch\myalert.bat", "test_message
    > 4 Open")
    >
    > As you are calling it now, the first argument is what needs to be
    > run. The extra command line arguments are not seen as arguments but
    > as part of the program name. Check MSDN if you need more detailed
    > help.
    >
     
    Kevin O'Brien, Feb 26, 2007
    #6
    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. Adrian Bezzina
    Replies:
    0
    Views:
    516
    Adrian Bezzina
    Aug 7, 2003
  2. Chris
    Replies:
    4
    Views:
    3,703
    Chris
    Nov 27, 2003
  3. ewolfman
    Replies:
    4
    Views:
    3,355
    ewolfman
    Feb 13, 2006
  4. Oscar
    Replies:
    2
    Views:
    3,036
    Oscar
    Sep 30, 2006
  5. Savas Ates
    Replies:
    1
    Views:
    286
    Patrice
    Aug 17, 2004
Loading...

Share This Page