From 6cc5fe8ff64a810f700a2fac90a363d5eefee054 Mon Sep 17 00:00:00 2001 From: Nguyen Tran Date: Sun, 21 May 2023 23:39:13 -0400 Subject: [PATCH 1/5] Add admin permissions when non-admin doesn't work --- .../Helper/ResultHelper.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Plugins/Flow.Launcher.Plugin.WindowsSettings/Helper/ResultHelper.cs b/Plugins/Flow.Launcher.Plugin.WindowsSettings/Helper/ResultHelper.cs index 0bfb00b34..308e4a88c 100644 --- a/Plugins/Flow.Launcher.Plugin.WindowsSettings/Helper/ResultHelper.cs +++ b/Plugins/Flow.Launcher.Plugin.WindowsSettings/Helper/ResultHelper.cs @@ -1,4 +1,5 @@ using System; +using System.ComponentModel; using System.Collections.Generic; using System.Diagnostics; using System.Linq; @@ -201,6 +202,21 @@ namespace Flow.Launcher.Plugin.WindowsSettings.Helper Process.Start(processStartInfo); return true; } + catch (Win32Exception) + { + try + { + processStartInfo.UseShellExecute = true; + processStartInfo.Verb = "runas"; + Process.Start(processStartInfo); + return true; + } + catch (Exception exception) + { + Log.Exception("can't open settings on elevated permission", exception, typeof(ResultHelper)); + return false; + } + } catch (Exception exception) { Log.Exception("can't open settings", exception, typeof(ResultHelper)); From 31d80fe378f5644a155f8623b70f36012cb10927 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 26 May 2023 07:54:41 +0000 Subject: [PATCH 2/5] Bump Microsoft.IO.RecyclableMemoryStream from 2.3.1 to 2.3.2 (#2154) --- Flow.Launcher.Core/Flow.Launcher.Core.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Flow.Launcher.Core/Flow.Launcher.Core.csproj b/Flow.Launcher.Core/Flow.Launcher.Core.csproj index 4077320bc..429dcd00f 100644 --- a/Flow.Launcher.Core/Flow.Launcher.Core.csproj +++ b/Flow.Launcher.Core/Flow.Launcher.Core.csproj @@ -1,4 +1,4 @@ - + net7.0-windows @@ -55,7 +55,7 @@ - + From 4ddf037a6f2656fda2b50def028aff6b08fe32d9 Mon Sep 17 00:00:00 2001 From: Ioannis G Date: Fri, 26 May 2023 16:35:10 +0300 Subject: [PATCH 3/5] remove NuGet.CommandLine package AppVeyor now has the nuget CLI pre-installed in the build image we use, so we no longer need to manually install and alias it in our build script. --- Flow.Launcher/Flow.Launcher.csproj | 4 ---- Scripts/post_build.ps1 | 1 - 2 files changed, 5 deletions(-) diff --git a/Flow.Launcher/Flow.Launcher.csproj b/Flow.Launcher/Flow.Launcher.csproj index 02930fc25..384df2e62 100644 --- a/Flow.Launcher/Flow.Launcher.csproj +++ b/Flow.Launcher/Flow.Launcher.csproj @@ -94,10 +94,6 @@ - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - diff --git a/Scripts/post_build.ps1 b/Scripts/post_build.ps1 index 23eabedfd..1757ed99e 100644 --- a/Scripts/post_build.ps1 +++ b/Scripts/post_build.ps1 @@ -71,7 +71,6 @@ function Pack-Squirrel-Installer ($path, $version, $output) { Write-Host "Packing: $spec" Write-Host "Input path: $input" - New-Alias Nuget $env:USERPROFILE\.nuget\packages\NuGet.CommandLine\6.3.1\tools\NuGet.exe -Force # dotnet pack is not used because ran into issues, need to test installation and starting up if to use it. nuget pack $spec -Version $version -BasePath $input -OutputDirectory $output -Properties Configuration=Release From bbaa388ff4b6a0cf0404a1276dfe1f4a17ac9cb2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 1 Jun 2023 06:29:41 +0000 Subject: [PATCH 4/5] Bump FSharp.Core from 7.0.0 to 7.0.300 (#2163) --- Flow.Launcher.Core/Flow.Launcher.Core.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Flow.Launcher.Core/Flow.Launcher.Core.csproj b/Flow.Launcher.Core/Flow.Launcher.Core.csproj index 429dcd00f..8d06e71c5 100644 --- a/Flow.Launcher.Core/Flow.Launcher.Core.csproj +++ b/Flow.Launcher.Core/Flow.Launcher.Core.csproj @@ -54,7 +54,7 @@ - + From 6bdf6ac1ce3d02e3e04dc31389866f12f2fe75ac Mon Sep 17 00:00:00 2001 From: Ioannis G Date: Sun, 4 Jun 2023 06:20:50 +0300 Subject: [PATCH 5/5] fix kill command to honor "Last Query Style" --- .../Flow.Launcher.Plugin.ProcessKiller/Main.cs | 15 +++++---------- .../ProcessHelper.cs | 3 ++- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Main.cs b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Main.cs index 3eff7e398..be2a2dd66 100644 --- a/Plugins/Flow.Launcher.Plugin.ProcessKiller/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.ProcessKiller/Main.cs @@ -1,7 +1,6 @@ -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; using Flow.Launcher.Infrastructure; -using System.Threading.Tasks; namespace Flow.Launcher.Plugin.ProcessKiller { @@ -89,7 +88,8 @@ namespace Flow.Launcher.Plugin.ProcessKiller Action = (c) => { processHelper.TryKill(p); - _ = DelayAndReQueryAsync(query.RawQuery); // Re-query after killing process to refresh process list + // Re-query to refresh process list + _context.API.ChangeQuery(query.RawQuery, true); return true; } }); @@ -114,7 +114,8 @@ namespace Flow.Launcher.Plugin.ProcessKiller { processHelper.TryKill(p.Process); } - _ = DelayAndReQueryAsync(query.RawQuery); // Re-query after killing process to refresh process list + // Re-query to refresh process list + _context.API.ChangeQuery(query.RawQuery, true); return true; } }); @@ -122,11 +123,5 @@ namespace Flow.Launcher.Plugin.ProcessKiller return sortedResults; } - - private static async Task DelayAndReQueryAsync(string query) - { - await Task.Delay(500); - _context.API.ChangeQuery(query, true); - } } } diff --git a/Plugins/Flow.Launcher.Plugin.ProcessKiller/ProcessHelper.cs b/Plugins/Flow.Launcher.Plugin.ProcessKiller/ProcessHelper.cs index 0932955d6..0acc39fbb 100644 --- a/Plugins/Flow.Launcher.Plugin.ProcessKiller/ProcessHelper.cs +++ b/Plugins/Flow.Launcher.Plugin.ProcessKiller/ProcessHelper.cs @@ -1,4 +1,4 @@ -using Flow.Launcher.Infrastructure; +using Flow.Launcher.Infrastructure; using Flow.Launcher.Infrastructure.Logger; using System; using System.Collections.Generic; @@ -75,6 +75,7 @@ namespace Flow.Launcher.Plugin.ProcessKiller if (!p.HasExited) { p.Kill(); + p.WaitForExit(50); } } catch (Exception e)