From b07288e6749a94a2d6829a8a9ff4cf2201142bd2 Mon Sep 17 00:00:00 2001 From: Nils <52573120+niStee@users.noreply.github.com> Date: Mon, 29 Jan 2024 02:01:38 +0100 Subject: [PATCH] Fix/pswindowsupdate (#671) * cargo update * An elevated PowerShell is required to run Install-WindowsUpdate on my system. * Revert "cargo update" This reverts commit fb58ce761a4d249e828d0922599fb8ba562c676a. --- src/steps/powershell.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/steps/powershell.rs b/src/steps/powershell.rs index 6be22493..b5e5b67d 100644 --- a/src/steps/powershell.rs +++ b/src/steps/powershell.rs @@ -111,7 +111,7 @@ impl Powershell { "-NoProfile", "-Command", &format!( - "Import-Module PSWindowsUpdate; Install-WindowsUpdate -MicrosoftUpdate {} -Verbose", + "Start-Process powershell -Verb runAs -ArgumentList 'Import-Module PSWindowsUpdate; Install-WindowsUpdate -MicrosoftUpdate {} -Verbose'", if ctx.config().accept_all_windows_updates() { "-AcceptAll" } else {