diff --git a/Plugins/Wox.Plugin.Shell/Languages/en.xaml b/Plugins/Wox.Plugin.Shell/Languages/en.xaml
index 7a953986cc..6f56e83f58 100644
--- a/Plugins/Wox.Plugin.Shell/Languages/en.xaml
+++ b/Plugins/Wox.Plugin.Shell/Languages/en.xaml
@@ -4,6 +4,7 @@
Replace Win+R
Do not close Command Prompt after command execution
+ Always run as administrator
Shell
Allows to execute system commands from Wox. Commands should start with >
this command has been executed {0} times
diff --git a/Plugins/Wox.Plugin.Shell/ShellSetting.xaml b/Plugins/Wox.Plugin.Shell/ShellSetting.xaml
index f631f6e228..dc6de53bac 100644
--- a/Plugins/Wox.Plugin.Shell/ShellSetting.xaml
+++ b/Plugins/Wox.Plugin.Shell/ShellSetting.xaml
@@ -12,10 +12,12 @@
+
-
+
+
CMD
PowerShell
RunCommand
diff --git a/Plugins/Wox.Plugin.Shell/ShellSetting.xaml.cs b/Plugins/Wox.Plugin.Shell/ShellSetting.xaml.cs
index 639c5c3c98..ffa3b58568 100644
--- a/Plugins/Wox.Plugin.Shell/ShellSetting.xaml.cs
+++ b/Plugins/Wox.Plugin.Shell/ShellSetting.xaml.cs
@@ -17,6 +17,7 @@ namespace Wox.Plugin.Shell
{
ReplaceWinR.IsChecked = _settings.ReplaceWinR;
LeaveShellOpen.IsChecked = _settings.LeaveShellOpen;
+ AlwaysRunAsAdministrator.IsChecked = _settings.RunAsAdministrator;
LeaveShellOpen.IsEnabled = _settings.Shell != Shell.RunCommand;
LeaveShellOpen.Checked += (o, e) =>
@@ -29,6 +30,16 @@ namespace Wox.Plugin.Shell
_settings.LeaveShellOpen = false;
};
+ AlwaysRunAsAdministrator.Checked += (o, e) =>
+ {
+ _settings.RunAsAdministrator = true;
+ };
+
+ AlwaysRunAsAdministrator.Unchecked += (o, e) =>
+ {
+ _settings.RunAsAdministrator = false;
+ };
+
ReplaceWinR.Checked += (o, e) =>
{
_settings.ReplaceWinR = true;