I want to make the checkbox launch the program when you click on it. At the same time, everything is fine with the normal button. Am I missing something?
protected void cryptopro_CheckedChanged(object sender, EventArgs e)
{
string url = "https://gubinsoft.com/soft/CSPSetup.exe";
string soft = @"c:\\tmp\\CSPSetup.exe";
using (WebClient csp = new WebClient())
{
System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12;
csp.DownloadFile(url, soft);
}
using (Process csp = new Process())
{
csp.StartInfo.FileName = @"c:\\tmp\\CSPSetup.exe";
csp.Start();
}
}
Aucun commentaire:
Enregistrer un commentaire