From b07d1b027c42c045bce8304b40b4c27e4d03248f Mon Sep 17 00:00:00 2001 From: qianlifeng Date: Sun, 13 Apr 2014 18:16:58 +0800 Subject: [PATCH] Fix crash issue when user clicked cancel in UAC prompt window. --- Wox/SettingWindow.xaml.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Wox/SettingWindow.xaml.cs b/Wox/SettingWindow.xaml.cs index d20bf53779..698ea8c9f9 100644 --- a/Wox/SettingWindow.xaml.cs +++ b/Wox/SettingWindow.xaml.cs @@ -339,7 +339,14 @@ namespace Wox private void BtnEnableInstaller_OnClick(object sender, RoutedEventArgs e) { - Process.Start("Wox.UAC.exe", "AssociatePluginInstaller"); + try + { + Process.Start("Wox.UAC.exe", "AssociatePluginInstaller"); + } + catch (Exception) + { + //throw an exception when user click cancel in UAC prompt window. + } } #region Theme