Skip to content

Commit 304fb90

Browse files
committed
Expand EnvironmentVariable in Command
1 parent 7cfb71d commit 304fb90

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

Plugins/Flow.Launcher.Plugin.WindowsSettings/Helper/ResultHelper.cs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -150,12 +150,8 @@ private static bool DoOpenSettingsAction(WindowsSetting entry)
150150
ProcessStartInfo processStartInfo;
151151

152152
var command = entry.Command;
153-
154-
if (command.Contains("%windir%", StringComparison.InvariantCultureIgnoreCase))
155-
{
156-
var windowsFolder = Environment.GetFolderPath(Environment.SpecialFolder.Windows);
157-
command = command.Replace("%windir%", windowsFolder, StringComparison.InvariantCultureIgnoreCase);
158-
}
153+
154+
command = Environment.ExpandEnvironmentVariables(command);
159155

160156
if (command.Contains(' '))
161157
{

0 commit comments

Comments
 (0)