From cd970c32c8d93459f7a9eba81b6dd575bae4ecf8 Mon Sep 17 00:00:00 2001 From: starchyunderscore Date: Sat, 14 Oct 2023 23:23:38 -0400 Subject: [PATCH] Update run.ps1 make restore points work --- current/run.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/current/run.ps1 b/current/run.ps1 index 7358ea0..f08ff30 100644 --- a/current/run.ps1 +++ b/current/run.ps1 @@ -17,7 +17,7 @@ if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]: # Create restore point if the user wants to $restore = $Host.UI.PromptForChoice("Would you like to create a restore point? (Requires admin)", "", @("&Yes","&No"), 0) if ($restore -eq 0) { - Start-Process PowerShell -Verb RunAs "-NoProfile -ExecutionPolicy Bypass -Command `"try{Enable-ComputerRestore -Drive `"C:\`" ; Checkpoint-Computer -Description `"w11-nonadmin-utils script run`" -RestorePointType `"MODIFY_SETTINGS`" ; Write-Output `"Restore point created`"}catch{Write-Output `"Restore point creation failed`"} Write-Output `"Exiting in 5 seconds`" ; Start-Sleep -Seconds 5`"" + Start-Process PowerShell -Verb RunAs "-NoProfile -ExecutionPolicy Bypass -Command `"Enable-ComputerRestore -Drive C:\ ; Checkpoint-Computer -Description w11-nonadmin-utils_script_run -RestorePointType MODIFY_SETTINGS`"" } else { Write-Output "Skipping" }