I search how to add a download & execute function in my tool. Its a C# Program and i need code for download a .exe file with url and execute them. I use Visual Studio 2017.
Thanks for helping me.
Its working with .exe ?
I search how to add a download & execute function in my tool. Its a C# Program and i need code for download a .exe file with url and execute them. I use Visual Studio 2017.
Its working with .exe ?
Here is a method that takes the direct link of the file you want to download. It will download the file and execute it.
using System.Net;
using System.IO;
void DownloadFileAndExecute(string link)
{
WebClient wc = New WebClient();
string filename = Path.GetFileName(link);
wc.DownloadFile(link, filename)
Process.Start(filename)
}