From 35c58724ffe13a9a8ef9b88857b2006ded6a5664 Mon Sep 17 00:00:00 2001 From: shanghaobo <1186156343@qq.com> Date: Mon, 21 Aug 2023 10:44:02 +0800 Subject: [PATCH] fix:Disable configuration files when executing powershell commands to improve loading speed #34 --- toast.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toast.go b/toast.go index 1bcba4b..7c0baa7 100644 --- a/toast.go +++ b/toast.go @@ -350,7 +350,7 @@ func invokeTemporaryScript(content string) error { if err != nil { return err } - cmd := exec.Command("PowerShell", "-ExecutionPolicy", "Bypass", "-File", file) + cmd := exec.Command("PowerShell", "-NoProfile", "-ExecutionPolicy", "Bypass", "-File", file) cmd.SysProcAttr = &syscall.SysProcAttr{HideWindow: true} if err = cmd.Run(); err != nil { return err