I've got a working program written up that downloads a file from a site and unzips it to a specific location. Everything works fine when I test the program, but once I compile it and try to run it I get timeout errors at the My.Computer.Network.DownloadFile line. The site I'm downloading from has a counter which only allows you to download the data file 10 times per 24 hours and even with the timeout error the counter is incrementing on my user control panel but the file does not download.
If I run the program as administrator it works just fine. Is there a way to get the program to always run as admin, or at the very least pop up the UAC window to prompt as the program is executed? Having to right-click-> run as admin every time is frustrating and I'd like it to be a lot cleaner when I release the program for distribution. I've got a feeling this is just a firewall restriction, but I don't know if it's even possible to have my program automatically create it's own exception. That seems like it would defeat the entire purpose of a firewall.
Edit: I figured out how to prompt the user at launch. Is there another way to allow this program to run without prompting? Some way I can rewrite it to allow the download without requireing admin privleges? I know I have programs that I run every day that use internet access and sometimes download files but don't prompt for me to allow them privileges every time I run them.
If I run the program as administrator it works just fine. Is there a way to get the program to always run as admin, or at the very least pop up the UAC window to prompt as the program is executed? Having to right-click-> run as admin every time is frustrating and I'd like it to be a lot cleaner when I release the program for distribution. I've got a feeling this is just a firewall restriction, but I don't know if it's even possible to have my program automatically create it's own exception. That seems like it would defeat the entire purpose of a firewall.
Edit: I figured out how to prompt the user at launch. Is there another way to allow this program to run without prompting? Some way I can rewrite it to allow the download without requireing admin privleges? I know I have programs that I run every day that use internet access and sometimes download files but don't prompt for me to allow them privileges every time I run them.
Last edited: