Recently, I've been trying to program a C# application in visual studio. I want it to be able to download a folder onto the person's desktop. Farther, I was hoping to be able to run a exe file in the folder I downloaded twice, as soon as it was done downloading. I am new to C#, and need some help. While looking through some forums online, I found you could use the command marked with (1) at the bottom.
The problem is I have no idea what I would use to make it download a file to the same location on everyone's pc. Because everyone's name might be different. IE: user12345(2) and user54321(3)
(1): using (var wc = new WebClient())
{
wc.DownloadFile("A link", @"c:\some\local\filename");
}
(2): using (var wc = new WebClient())
{
wc.DownloadFile("", @"C:\Users\**user12345**\Desktop");
}
(3): using (var wc = new WebClient())
{
wc.DownloadFile("", @"C:\Users\**user54321**\Desktop");
}
Thanks for the help, Atomic