Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Flag if java is installed
- private bool _isInstalling;
- public bool JavaIsInstalled
- {
- get { return _isInstalling; }
- set { _isInstalling = value; }
- }
- public void executeCmdCommand(string argument)
- {
- var arg0 = argument; // Path
- 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 " + arg0;
- process.StartInfo = startInfo;
- // Set flag that it is installing
- MessageBox.Show("is installting");
- _isInstalling = true;
- process.Start();
- MessageBox.Show("finished installing");
- // Set flag that is finished installing
- _isInstalling = false;
- }
Add Comment
Please, Sign In to add comment