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 11using System ;
2+ using System . ComponentModel ;
23using System . Collections . Generic ;
34using System . Diagnostics ;
45using System . Linq ;
@@ -201,6 +202,21 @@ private static bool DoOpenSettingsAction(WindowsSetting entry)
201202 Process . Start ( processStartInfo ) ;
202203 return true ;
203204 }
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+ }
204220 catch ( Exception exception )
205221 {
206222 Log . Exception ( "can't open settings" , exception , typeof ( ResultHelper ) ) ;
You can’t perform that action at this time.
0 commit comments