Exemplo n.º 1
0
        public void okbutonu_Click(object sender, EventArgs e)
        {
            Success suc = new Success();



            Process[] pro  = Process.GetProcessesByName("java");
            Process[] proc = Process.GetProcessesByName("javaw");
            if (pro.Length > 0 || proc.Length > 0)
            {
                foreach (Process r in proc)
                {
                    r.Kill();
                }

                foreach (Process p in pro)
                {
                    p.Kill();
                }
            }


            //progressBar1.Visible = true;


            int s = 10000;

            System.Threading.Thread.Sleep(s);



            string update_db_yolu = @"C:\42Apps\APPUPD\db\updater.db3";

            if (System.IO.File.Exists(update_db_yolu))
            {
                System.IO.File.Delete(update_db_yolu);
            }

            else
            {
                MessageBox.Show("Dosya Bulunamadı", "Hata!!", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }



            Process process = new Process();

            process.StartInfo.WorkingDirectory = @"C:\42Apps\APPUPD\";
            process.StartInfo.FileName         = "run.bat";
            process.Start();


            int y = 25000;

            System.Threading.Thread.Sleep(y);

            HttpWebRequest istek = (HttpWebRequest)WebRequest.Create("http://*****:*****@"C:\42Apps\PCKASA\";
            processpckasa.StartInfo.FileName         = "run.bat";

            processpckasa.Start();


            Close();
        }
Exemplo n.º 2
0
 public Trigger_Update_Dialog()
 {
     InitializeComponent();
     Success suc = new Success();
 }