File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
Plugins/Flow.Launcher.Plugin.WindowsSettings/Helper Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change 1
1
using System ;
2
+ using System . ComponentModel ;
2
3
using System . Collections . Generic ;
3
4
using System . Diagnostics ;
4
5
using System . Linq ;
@@ -201,6 +202,21 @@ private static bool DoOpenSettingsAction(WindowsSetting entry)
201
202
Process . Start ( processStartInfo ) ;
202
203
return true ;
203
204
}
205
+ catch ( Win32Exception )
206
+ {
207
+ try
208
+ {
209
+ processStartInfo . UseShellExecute = true ;
210
+ processStartInfo . Verb = "runas" ;
211
+ Process . Start ( processStartInfo ) ;
212
+ return true ;
213
+ }
214
+ catch ( Exception exception )
215
+ {
216
+ Log . Exception ( "can't open settings on elevated permission" , exception , typeof ( ResultHelper ) ) ;
217
+ return false ;
218
+ }
219
+ }
204
220
catch ( Exception exception )
205
221
{
206
222
Log . Exception ( "can't open settings" , exception , typeof ( ResultHelper ) ) ;
You can’t perform that action at this time.
0 commit comments