Expand EnvironmentVariable in Command

This commit is contained in:
Kevin Zhang 2021-10-30 00:11:17 -05:00
parent 7cfb71df35
commit 304fb90c5d

View file

@ -151,11 +151,7 @@ namespace Flow.Plugin.WindowsSettings.Helper
var command = entry.Command; var command = entry.Command;
if (command.Contains("%windir%", StringComparison.InvariantCultureIgnoreCase)) command = Environment.ExpandEnvironmentVariables(command);
{
var windowsFolder = Environment.GetFolderPath(Environment.SpecialFolder.Windows);
command = command.Replace("%windir%", windowsFolder, StringComparison.InvariantCultureIgnoreCase);
}
if (command.Contains(' ')) if (command.Contains(' '))
{ {