Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > execute program on web server

Reply
Thread Tools

execute program on web server

 
 
Kevin O'Brien
Guest
Posts: n/a
 
      02-23-2007
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



 
Reply With Quote
 
 
 
 
Michael Nemtsev
Guest
Posts: n/a
 
      02-23-2007
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


 
Reply With Quote
 
 
 
 
bruce barker
Guest
Posts: n/a
 
      02-23-2007
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
>
>
>

 
Reply With Quote
 
Kevin O'Brien
Guest
Posts: n/a
 
      02-24-2007
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
>>
>>


 
Reply With Quote
 
Gozirra
Guest
Posts: n/a
 
      02-25-2007
> 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.

 
Reply With Quote
 
Kevin O'Brien
Guest
Posts: n/a
 
      02-26-2007
That did it!

Thank you very much Gozirra.

Kevin



"Gozirra" <> wrote in message
news: 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.
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Server.Transfer or Server.Execute vs WebClient ewolfman ASP .Net 4 02-13-2006 07:14 AM
Can i execute aspx file in my asp pag with server.execute method(sorry) Savas Ates ASP General 1 08-17-2004 04:52 PM
Cannot execute a program. (C# Web app error) Chris ASP .Net 4 11-27-2003 04:36 AM
Re: Server.Execute and Server.Transfer not detecting session state Adrian Bezzina ASP .Net 0 08-20-2003 12:02 AM
Server.Execute and Server.Transfer not detecting session state Adrian Bezzina ASP .Net 0 08-07-2003 07:13 AM



Advertisments