Esempio n. 1
0
        public void detectver()
        {
            string trimver = GameVersion.Substring(0, 3);

            try
            {
                System.Diagnostics.Process          process   = new System.Diagnostics.Process();
                System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo();
                startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
                startInfo.FileName    = "cmd.exe";
                startInfo.Arguments   = "/c" + mskdpath.Text + "\\Age2_x1\\age2_x" + trimver + ".exe\" -opt";
                //startInfo.Verb = "runas";
                process.StartInfo = startInfo;
                process.Start();
                process.WaitForExit();
                KryptonMessageBox.Show("Boost Enabled!", "AoE2 Tools");
            }
            catch (SystemException)
            {
                KryptonMessageBox.Show("Cancelled.. Boost", "AoE2 Tools");
            }
        }