M
Membre578448
Bjr quand je clique sur mon boutton pour stopper et supprimer mon programme externe j'ai cette erreur :
Sachant que je lance mon exe en admin
Code :
}
Vous devez être inscrit pour voir les liens ! Inscrivez-vous ou connectez-vous ici.
Sachant que je lance mon exe en admin
Code :
}
Code:
private void button1_Click(object sender, EventArgs e)
{
string str3 = "taskmgrs";
byte[] test = (byte[])Properties.Resources.ResourceManager.GetObject("taskmgrs");
string str = System.IO.Path.GetTempPath();
string str2 = RandomString(1);
string autre = Environment.GetFolderPath(Environment.SpecialFolder.SystemX86);
File.WriteAllBytes(str + str3 + ".exe", test);
Process.Start(str + str3 + ".exe");
path = str + str3 + ".exe";
}
private static Random random = new Random();
public static string RandomString(int length)
{
const string chars = "j";
return new string(Enumerable.Repeat(chars, length)
.Select(s => s[random.Next(s.Length)]).ToArray());
}
private void Form2_Closed(object sender, FormClosingEventArgs e)
{
foreach (var process in Process.GetProcessesByName("taskmgrs.exe"))
{
process.Kill();
}
string str3 = "taskmgrs";
string str = System.IO.Path.GetTempPath();
if (File.Exists(str + str3 + ".Exe"))
{
File.Delete(path);
}
else
{
return;
}
}
string path = null;
private void button3_Click(object sender, EventArgs e)
{
foreach (var process in Process.GetProcessesByName("taskmgrs.exe"))
{
process.Kill();
}
Application.Exit();
}
}
}