fix: start powershell without user profile

This commit is contained in:
Marcello 2023-05-26 16:30:03 +02:00
parent c54e96e3e3
commit 6d98eb6323

View file

@ -30,7 +30,7 @@ internal static class ScriptExecutor
".ps1" => new ProcessStartInfo ".ps1" => new ProcessStartInfo
{ {
FileName = "powershell.exe", FileName = "powershell.exe",
Arguments = $"-ExecutionPolicy Bypass -File .\\{file.Name}", Arguments = $"-NoProfile -ExecutionPolicy Bypass -File .\\{file.Name}",
Verb = elevated ? "runas /user:Administrator" : string.Empty, Verb = elevated ? "runas /user:Administrator" : string.Empty,
WorkingDirectory = file.DirectoryName WorkingDirectory = file.DirectoryName
}, },