execute program on web server

  • Thread starter Thread starter Kevin O'Brien
  • Start date Start date
K

Kevin O'Brien

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
 
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
 
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)
 
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
 
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.
 
Back
Top