Re: Run an .exe

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Nicholas Paldino [.NET/C# MVP] (mvp_at_spam.guard.caspershouse.com)
Date: 11/03/04


Date: Wed, 3 Nov 2004 13:26:04 -0500


    When you call the Start method on the Process class, it runs on the
server, so you now have an instance of notepad running on the server.

    If you want this to run on the client, you will have to install an
ActiveX control, or a .NET control (with the appropriate security rights)
and then spawn the process from that. These controls will run in the client
context, and allow you to run programs on that.

    Hope this helps.

-- 
               - Nicholas Paldino [.NET/C# MVP]
               - mvp@spam.guard.caspershouse.com
"mg" <mg@discussions.microsoft.com> wrote in message 
news:6B78C50D-B6A8-460F-B112-9D7BDC6E57CF@microsoft.com...
>I put
>
> System.Diagnostics.Process.Start("C:\\WINDOWS\\system32\\notepad.exe");
>
> in Page_Load but notepad did not run. What did I do wrong?
>
>
> "Jon Skeet [C# MVP]" wrote:
>
>> mg <mg@discussions.microsoft.com> wrote:
>> > How can I run an .exe using C# from within the code behind of a WebForm 
>> > app?
>>
>> Where do you want to run the .exe? On the client, or the server? You
>> won't be able to do it on the client. To do it on the server, use
>> Process.Start.
>>
>> -- 
>> Jon Skeet - <skeet@pobox.com>
>> http://www.pobox.com/~skeet
>> If replying to the group, please do not mail me too
>> 

Quantcast