execute program on web server

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Kevin O'Brien

    execute program on web server

    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



  • Michael Nemtsev

    #2
    Re: execute program on web server

    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

    KHey guys,
    K>
    KI have a button that when clicked I want it to execute a program on
    Kthe web server and not on the client machine. Can someone please
    Ktell me how this is done?
    K>
    KThank you,
    KKevin


    Comment

    • bruce barker

      #3
      Re: execute program on web server

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

      Comment

      • Kevin O'Brien

        #4
        Re: execute program on web server

        Hey guys,

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

        This works great :
        System.Diagnost ics.Process.Sta rt("notepad.exe ")

        But this gives me an error:
        System.Diagnost ics.Process.Sta rt("d:\batch\my alert.bat
        test_message 4 Open")

        It works fine from the command line.

        Thank you,
        Kevin



        "bruce barker" <nospam@nospam. comwrote in message
        news:%23QdDp85V HHA.4964@TK2MSF TNGP06.phx.gbl. ..
        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
        >>
        >>

        Comment

        • Gozirra

          #5
          Re: execute program on web server

          But this gives me an error:
          System.Diagnost ics.Process.Sta rt("d:\batch\my alert.bat
          test_message 4 Open")
          Assuming that "test_messa ge 4 Open" are all supposed to be command-
          line arguments you must call start as -
          System.Diagnosi tcs.Process.Sta rt("d:\batch\my alert.bat", "test_messa ge
          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.

          Comment

          • Kevin O'Brien

            #6
            Re: execute program on web server

            That did it!

            Thank you very much Gozirra.

            Kevin



            "Gozirra" <rmturner76@gma il.comwrote in message
            news:1172372171 .049404.223960@ p10g2000cwp.goo glegroups.com.. .
            >But this gives me an error:
            > System.Diagnost ics.Process.Sta rt("d:\batch\my alert.bat
            >test_message 4 Open")
            >
            Assuming that "test_messa ge 4 Open" are all supposed to be command-
            line arguments you must call start as -
            System.Diagnosi tcs.Process.Sta rt("d:\batch\my alert.bat", "test_messa ge
            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.
            >

            Comment

            Working...