473,462 Members | 1,350 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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

Feb 23 '07 #1
5 2013
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
Feb 23 '07 #2
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
Feb 23 '07 #3
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" <no****@nospam.comwrote in message
news:%2****************@TK2MSFTNGP06.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

Feb 24 '07 #4
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.

Feb 25 '07 #5
That did it!

Thank you very much Gozirra.

Kevin

"Gozirra" <rm********@gmail.comwrote in message
news:11**********************@p10g2000cwp.googlegr oups.com...
>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.

Feb 26 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Fred | last post by:
I have read and tried every combination for hours. I'm sorry, but I don't get it. How do I have a form with textboxes and buttons and allow click events to execute a server function then display...
0
by: Eric Wood | last post by:
We have an application that is accessed using shared drives, client executes program from server. We have already coded the program to create and save the a bat file either locally on the users...
4
by: Chris | last post by:
I posted this in the C# language group, then thought it might be more appropriate in this group. I would not cross-post except I want the answer so badly. I built small C# Web and Web Service...
6
by: rockdale.green | last post by:
Hi, All I am try to launch a program from a button on my asp.net page. Let's say the program is NotePad.exe. and I came across this article....
1
by: Eric Wood | last post by:
We have an application that is accessed using shared drives, client executes program from server. We have already coded the program to create and save the a bat file either locally on the users...
2
by: joe1977 | last post by:
Win2k3, PHP 5, Apache 2, Acrobat 7 when I go to my server, pull out cmd.exe and type as follows: "c:\Program Files\Adobe\Acrobat 7.0\\Reader\AcroRd32.exe" /t "c:\Program Files\Adobe\Acrobat...
6
by: =?Utf-8?B?RGF2ZQ==?= | last post by:
I'm running VS 2003/ASP.NET 1.1.4322.0 on XP SP2 All of a sudden I started to getting... "Error while trying to run project: Unable to start debugging on the web server. Server side-error...
6
by: moongeegee | last post by:
I have compile my java program as myjava.class. And I can run as "java myjava" without any program. As now, I need to execute myjava.class in javascript. Please shed a light how to execut "java...
5
by: sayeo87 | last post by:
Hi, I am quite new to JSP so please forgive me if I ask really simple things... I am trying to run system commands on the server and display the output on a webpage. This is what I've got: <%@...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.