UninstallOffice() public method

public UninstallOffice ( string installVer = "2016" ) : void
installVer string
return void
        public async Task UninstallOffice()
        {
            await Task.Run(async () =>
            {
                try {
                    GlobalObjects.ViewModel.BlockNavigation = true;

                    Dispatcher.Invoke(() =>
                    {
                        InstallOffice.IsEnabled = false;
                        ReInstallOffice.IsEnabled = false;
                    });

                    GlobalObjects.ViewModel.ConfigXmlParser.ConfigurationXml.Display.Level = DisplayLevel.Full;

                    SetItemState(LocalViewItem.Uninstall, LocalViewState.Wait);

                    var installGenerator = new OfficeInstallManager();
                    string installVer = "2016";
                    if (LocalInstall.Version.StartsWith("15."))
                    {
                        installVer = "2013";
                    }
                    installGenerator.UninstallOffice(installVer);

                    SetItemState(LocalViewItem.Uninstall, LocalViewState.Success);

                    await LoadViewState();

                    Dispatcher.Invoke(() =>
                    {
                        InstallOffice.IsEnabled = true;
                        ReInstallOffice.IsEnabled = true;
                    });
                }
                catch (Exception ex)
                {
                    SetItemState(LocalViewItem.Uninstall, LocalViewState.Fail);
                    LogErrorMessage(ex);
                }
                finally
                {
                    GlobalObjects.ViewModel.BlockNavigation = false;
                }
            });
        }