Link to home
Start Free TrialLog in
Avatar of andre72
andre72

asked on

Problem with UAC when downloading a exe using WebClient

Hi,

I'm using this to download a application (exe) from the web:
webClient = new WebClient();
webClient.DownloadFileCompleted += new AsyncCompletedEventHandler(Completed);
webClient.DownloadProgressChanged += new DownloadProgressChangedEventHandler(ProgressChanged);
webClient.DownloadFileAsync(new Uri(downloadpath), file);

This works fine if UAC is disabled and also when UAC is enabled as long my application is not installed to the "Program Files".
If UAC is enabled and my app try to download an exe using the WebClient fiddler doesn't show any action that I try to download anything (so no error message for sure).
In case I download a zip archive anything works fine ...

Is there a workaround to let the WebClient download an exe also when UAC is enabled and the downloading app is installed to the "Program Files"?

Thanks

Andre
Avatar of rowansmith
rowansmith

You need to download the file to a location that the user has access too.  Such as the DOWNLOADS directory or the TEMP directory.

-Rowan
Avatar of andre72

ASKER

And why is it possible to download a zip archive but not an exe?
try to adjust you virus realtime protection to permissive not aggressive.
try to adjust your ANTI virus software realtime protection to permissive not aggressive.
ASKER CERTIFIED SOLUTION
Avatar of nffvrxqgrcfqvvc
nffvrxqgrcfqvvc

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial