Пример #1
0
        private void InstallDriver()
        {
            bool   needRestart;
            string failureReason;

            if (DriverManagement.InstallDriver(out needRestart, out failureReason))
            {
                if (needRestart)
                {
                    MessageBox.Show("BusDog Filter Driver installed! Restart required to complete.",
                                    "Driver Installed");
                }
                else
                {
                    MessageBox.Show("BusDog Filter Driver installed!",
                                    "Driver Installed");
                }
            }
            else
            {
                MessageBox.Show(string.Format("BusDog Filter Driver installation failed ({0})", failureReason),
                                "Driver Installation Failed");
            }
        }