Launching An Application from C# Using a URL

Launching An Application from C# Using a URL

am 23.11.2004 00:09:02 von DrewLettington

I want to launch an installation (setup.exe) from a Web Server using via a
URL. I currently accomplish this by passing the URL to IE:

System.Diagnostics.Process ieProcess = new System.Diagnostics.Process();
ieProcess.StartInfo.FileName = "iexplore.exe";
ieProcess.StartInfo.Arguments = "http://server/path/setup.exe";
ieProcess.Start();

This works okay but users see an IE window flash on the screen before it
launches the installation program. It also doesn't seem like the most
efficient way to accomplish this task.

Is there a better way to launch an application from a web server via a URL
from C#?

- Drew

Re: Launching An Application from C# Using a URL

am 23.11.2004 13:23:00 von Patrice

You could likely use WebClient to download the file before launching it
locally... Or just have a link and ask users to run the file.

The whole story may help (for now I don't see the goal of the program that
launches the setup ; shouldn't the user just launch the setup program ? ; if
this is for an auto updating application you may want to check the building
blocks and auto-updating samples available at msdn).

Patrice

--

"Drew Lettington" a écrit dans le
message de news:305E7867-20FB-4E85-BC0C-69AD9C5D5F30@microsoft.com...
> I want to launch an installation (setup.exe) from a Web Server using via a
> URL. I currently accomplish this by passing the URL to IE:
>
> System.Diagnostics.Process ieProcess = new System.Diagnostics.Process();
> ieProcess.StartInfo.FileName = "iexplore.exe";
> ieProcess.StartInfo.Arguments = "http://server/path/setup.exe";
> ieProcess.Start();
>
> This works okay but users see an IE window flash on the screen before it
> launches the installation program. It also doesn't seem like the most
> efficient way to accomplish this task.
>
> Is there a better way to launch an application from a web server via a URL
> from C#?
>
> - Drew