Skip to content

Commit faa529e

Browse files
committed
修复安装路径空格问题
1 parent 75cab2d commit faa529e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

FluentLauncher.UniversalInstaller/Pages/ProgressPage.xaml.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ static void CheckPowerShellCommand(string commandName)
289289

290290
foreach (string path in dependencyPackagesPath)
291291
{
292-
using var process = Process.Start(new ProcessStartInfo("powershell", $"Add-AppxPackage -Path \"{path}\" -ForceUpdateFromAnyVersion -ForceApplicationShutdown")
292+
using var process = Process.Start(new ProcessStartInfo("powershell", $"-Command \"Add-AppxPackage -Path \'{path}\' -ForceUpdateFromAnyVersion -ForceApplicationShutdown\"")
293293
{
294294
RedirectStandardOutput = true,
295295
RedirectStandardError = true,
@@ -313,8 +313,8 @@ static void CheckPowerShellCommand(string commandName)
313313

314314
#region Install/Update Package
315315

316-
string forceUpdateOption = isPackageInstalled ? " -ForceUpdateFromAnyVersion" : string.Empty;
317-
using (var process = Process.Start(new ProcessStartInfo("powershell", $"Add-AppxPackage -Path \"{packagePath}\" -ForceApplicationShutdown" + forceUpdateOption)
316+
string forceUpdateOption = isPackageInstalled ? "-ForceUpdateFromAnyVersion" : string.Empty;
317+
using (var process = Process.Start(new ProcessStartInfo("powershell", $"-Command \"Add-AppxPackage -Path \'{packagePath}\' -ForceApplicationShutdown {forceUpdateOption}\"")
318318
{
319319
RedirectStandardOutput = true,
320320
RedirectStandardError = true,

0 commit comments

Comments
 (0)