From c5c693995dca9802f706470acc222c135dbfaa54 Mon Sep 17 00:00:00 2001 From: OlaYZen Date: Tue, 11 Oct 2022 09:19:36 +0200 Subject: [PATCH] test --- EnhanceWindows.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/EnhanceWindows.ps1 b/EnhanceWindows.ps1 index 9d5dc4e..7571ccb 100644 --- a/EnhanceWindows.ps1 +++ b/EnhanceWindows.ps1 @@ -1,7 +1,8 @@ #======================================================== # Starts Powershell with the Modules and as hidden #======================================================== -ECHO 'Y' | if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) { Start-Process powershell.exe "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"" -Verb RunAs; exit } +ECHO 'Y' | +if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) { Start-Process powershell.exe "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"" -Verb RunAs; exit } [void] [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing") [void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")