Exemplo n.º 1
0
        public static void Uninstall()
        {
            string  UninstallerString = DeviceDriverUninstallerRegistry.GetUninstallString();
            Process Uninstall         = Process.Start("cmd.exe", "/C \"" + UninstallerString + "\"");

            Uninstall.WaitForExit();
        }
        private bool AskForUpdate()
        {
            string           InstalledVersion = DeviceDriverUninstallerRegistry.GetInstalledVersionString();
            MessageBoxResult Result           = MessageBox.Show(string.Format(HIDWiimote.ControlCenter.Properties.App.UpdaterDialog_MainMessage, VersionStrings.DeviceDriverVersion, InstalledVersion), "HID Wiimote Updater", MessageBoxButton.YesNo, MessageBoxImage.Question);

            return(Result == MessageBoxResult.Yes);
        }
        private bool InstallNewDeviceDriver()
        {
            try
            {
                DeviceDriver.Install();
            }
            catch (Exception e)
            {
                ErrorMessage = HIDWiimote.ControlCenter.Properties.App.Updater_InstallDeviceDriverException + "\n\n" + e.Message;
                return(false);
            }

            bool InstallCheck = (DeviceDriverUninstallerRegistry.GetUninstallString().Length != 0);

            if (!InstallCheck)
            {
                ErrorMessage = HIDWiimote.ControlCenter.Properties.App.Updater_InstallDeviceDriverCheckFailed;
                return(false);
            }

            return(true);
        }
Exemplo n.º 4
0
 public bool Do()
 {
     return(DeviceDriverUninstallerRegistry.CreateHIDWiimoteUninstallKey(UninstallString, DPInstPath));
 }
Exemplo n.º 5
0
        public static bool IsInstalled()
        {
            DeviceDriverUninstallerRegistry.DeviceDriverState DPState = DeviceDriverUninstallerRegistry.GetDeviceDriverState(VersionStrings.DeviceDriverVersion);

            return(DPState != DeviceDriverUninstallerRegistry.DeviceDriverState.NoneInstalled);
        }