Results 1 to 8 of 8

Thread: Download & Run

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Oct 2002
    Location
    Peru
    Posts
    21

    Unhappy Download & Run

    How i can download & Run a program from internet in visual C# ?? , without prompt a user?

    please do you have some example

  2. #2
    PowerPoster sunburnt's Avatar
    Join Date
    Feb 2001
    Location
    Boulder, Colorado
    Posts
    1,403
    PHP Code:
    using System.Net;
    using System.Diagnostics;
    //. ....
    WebClient w = new WebClient();
    Process p = new Process();

    w.DownloadFile("http://www.hello.com/test.exe","C:\\\test.exe");

    p.StartInfo = new ProcessStartInfo("C:\\\test.exe");
    p.Start(); 
    Every passing hour brings the Solar System forty-three thousand miles closer to Globular Cluster M13 in Hercules -- and still there are some misfits who insist that there is no such thing as progress.

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Oct 2002
    Location
    Peru
    Posts
    21
    This source is in c ?

  4. #4
    PowerPoster sunburnt's Avatar
    Join Date
    Feb 2001
    Location
    Boulder, Colorado
    Posts
    1,403
    Didn't you want it in C#?
    Every passing hour brings the Solar System forty-three thousand miles closer to Globular Cluster M13 in Hercules -- and still there are some misfits who insist that there is no such thing as progress.

  5. #5
    Hyperactive Member Scott Penner's Avatar
    Join Date
    Dec 2000
    Location
    Mountain View
    Posts
    327
    You can't really do this right now.

    You will need to wait for the release of version 1.1 of the framework. MS changed the security defaults for executing winform applications from the web because there were some holes in the security. They promise to have this fixed in v1.1.
    -scott
    he he he

  6. #6
    Hyperactive Member
    Join Date
    Aug 2002
    Location
    Toronto, Ontario, Canada
    Posts
    275
    does the c:\\ need to have to \\?

  7. #7
    yay gay PT Exorcist's Avatar
    Join Date
    Apr 2002
    Location
    . . . my reason of shame
    Posts
    2,729
    of course...because \ is a special char..u cant put it alone...or u can do @"C:\"
    \m/\m/

  8. #8
    Hyperactive Member
    Join Date
    Aug 2002
    Location
    Toronto, Ontario, Canada
    Posts
    275
    sorry just found that out when i read my book!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width