Skip to content

Commit c7435bb

Browse files
authored
Fix: Fixed Win32Exception in SetAsDefaultExplorerAsync (#13723)
1 parent ff87100 commit c7435bb

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Files.App/Utils/Shell/Win32API.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,10 +375,9 @@ public static async Task<bool> RunPowershellCommandAsync(string command, bool ru
375375
using Process process = CreatePowershellProcess(command, runAsAdmin);
376376
using var cts = new CancellationTokenSource(TimeSpan.FromMilliseconds(30 * 1000));
377377

378-
process.Start();
379-
380378
try
381379
{
380+
process.Start();
382381
await process.WaitForExitAsync(cts.Token);
383382
return process.ExitCode == 0;
384383
}

0 commit comments

Comments
 (0)