From b9fe08437669776b6f1ab2c439ca355da66f6068 Mon Sep 17 00:00:00 2001 From: OlaYZen Date: Tue, 11 Oct 2022 09:23:19 +0200 Subject: [PATCH] admin fix --- EnhanceWindows.ps1 | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/EnhanceWindows.ps1 b/EnhanceWindows.ps1 index 2ccd928..373acea 100644 --- a/EnhanceWindows.ps1 +++ b/EnhanceWindows.ps1 @@ -1,8 +1,6 @@ #======================================================== # 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 } [void] [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing") [void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") @@ -20,7 +18,7 @@ $LabelFont = New-Object System.Drawing.Font("Arial",30,[System.Drawing.FontStyle Clear-Host $host.ui.RawUI.WindowTitle = "Enhance Windows Powershell" -#powershell.exe -WindowStyle Hidden -file > $null +powershell.exe -WindowStyle Hidden -file > $null #======================================================== # Writes out OlaYZen's Name