From 6d98eb63232c4c3184ccf15a77fcb3117892ceff Mon Sep 17 00:00:00 2001 From: Marcello Lamonaca Date: Fri, 26 May 2023 16:30:03 +0200 Subject: [PATCH] fix: start powershell without user profile --- src/ScriptExecutor.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ScriptExecutor.cs b/src/ScriptExecutor.cs index 494abf2..2038f5c 100644 --- a/src/ScriptExecutor.cs +++ b/src/ScriptExecutor.cs @@ -30,7 +30,7 @@ internal static class ScriptExecutor ".ps1" => new ProcessStartInfo { FileName = "powershell.exe", - Arguments = $"-ExecutionPolicy Bypass -File .\\{file.Name}", + Arguments = $"-NoProfile -ExecutionPolicy Bypass -File .\\{file.Name}", Verb = elevated ? "runas /user:Administrator" : string.Empty, WorkingDirectory = file.DirectoryName },