private void stopDriverButton_Click(object sender, RoutedEventArgs e) { try { using (ServiceControlManager scm = new ServiceControlManager()) { scm.StopDriver(serviceNameTextBox.Text); } MessageBox.Show("Драйвер остановлен"); } catch (Exception ex) { MessageBox.Show(ex.Message); } }