diff --git a/build/MicaSetup/Helper/System/TempPathForkHelper.cs b/build/MicaSetup/Helper/System/TempPathForkHelper.cs index 5ec2367..22d597e 100644 --- a/build/MicaSetup/Helper/System/TempPathForkHelper.cs +++ b/build/MicaSetup/Helper/System/TempPathForkHelper.cs @@ -45,14 +45,9 @@ public static void Clean() { FluentProcess.Create() .FileName("powershell.exe") - .Arguments( - $""" - Start-Sleep -s 3; - Remove-Item "{filePath}"; - Remove-Item "{tempPath}"; - """) + .Arguments($"-NoProfile -ExecutionPolicy Bypass -Command \"Start-Sleep -s 3; Remove-Item '{filePath}'; Remove-Item '{tempPath}';\"") .UseShellExecute(false) - .CreateNoWindow() + .CreateNoWindow(true) .Start() .Forget(); }