execute program on web server

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
 
M

Michael Nemtsev

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
 
B

bruce barker

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

Kevin O'Brien

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
 
G

Gozirra

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.
 

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,995
Messages
2,570,225
Members
46,815
Latest member
treekmostly22

Latest Threads

Top