Skip to content

Commit 592452b

Browse files
committed
feat: clean up by bypass ps1
1 parent 536a8ee commit 592452b

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

build/MicaSetup/Helper/System/TempPathForkHelper.cs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,9 @@ public static void Clean()
4545
{
4646
FluentProcess.Create()
4747
.FileName("powershell.exe")
48-
.Arguments(
49-
$"""
50-
Start-Sleep -s 3;
51-
Remove-Item "{filePath}";
52-
Remove-Item "{tempPath}";
53-
""")
48+
.Arguments($"-NoProfile -ExecutionPolicy Bypass -Command \"Start-Sleep -s 3; Remove-Item '{filePath}'; Remove-Item '{tempPath}';\"")
5449
.UseShellExecute(false)
55-
.CreateNoWindow()
50+
.CreateNoWindow(true)
5651
.Start()
5752
.Forget();
5853
}

0 commit comments

Comments
 (0)