mirror of
https://github.com/massgravel/Microsoft-Activation-Scripts.git
synced 2025-02-22 04:59:56 +00:00
Remove UnQuickEdit in check activation script
This commit is contained in:
@ -6613,23 +6613,6 @@ $Admin = ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdenti
|
|||||||
$line2 = "============================================================"
|
$line2 = "============================================================"
|
||||||
$line3 = "____________________________________________________________"
|
$line3 = "____________________________________________________________"
|
||||||
|
|
||||||
function UnQuickEdit
|
|
||||||
{
|
|
||||||
$t=[AppDomain]::CurrentDomain.DefineDynamicAssembly((Get-Random), 1).DefineDynamicModule((Get-Random), $False).DefineType((Get-Random))
|
|
||||||
$t.DefinePInvokeMethod('GetStdHandle', 'kernel32.dll', 22, 1, [IntPtr], @([Int32]), 1, 3).SetImplementationFlags(128)
|
|
||||||
$t.DefinePInvokeMethod('SetConsoleMode', 'kernel32.dll', 22, 1, [Boolean], @([IntPtr], [Int32]), 1, 3).SetImplementationFlags(128)
|
|
||||||
$t.DefinePInvokeMethod('GetConsoleWindow', 'kernel32.dll', 22, 1, [IntPtr], @(), 1, 3).SetImplementationFlags(128)
|
|
||||||
$t.DefinePInvokeMethod('SendMessageW', 'user32.dll', 22, 1, [IntPtr], @([IntPtr], [UInt32], [IntPtr], [IntPtr]), 1, 3).SetImplementationFlags(128)
|
|
||||||
$k=$t.CreateType()
|
|
||||||
if ($winbuild -GE 17763) {
|
|
||||||
if ($k::SendMessageW($k::GetConsoleWindow(), 127, 0, 0) -EQ [IntPtr]::Zero) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$v=(0x0080, 0x00A0)[!($winbuild -GE 10586)]
|
|
||||||
$b=$k::SetConsoleMode($k::GetStdHandle(-10), $v)
|
|
||||||
}
|
|
||||||
|
|
||||||
function echoWindows
|
function echoWindows
|
||||||
{
|
{
|
||||||
CONOUT "$line2"
|
CONOUT "$line2"
|
||||||
@ -7538,7 +7521,6 @@ function ClicRun
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
$Host.UI.RawUI.WindowTitle = "Check Activation Status"
|
$Host.UI.RawUI.WindowTitle = "Check Activation Status"
|
||||||
UnQuickEdit
|
|
||||||
if ($All.IsPresent) {
|
if ($All.IsPresent) {
|
||||||
$B=$Host.UI.RawUI.BufferSize;$B.Height=3000;$Host.UI.RawUI.BufferSize=$B;
|
$B=$Host.UI.RawUI.BufferSize;$B.Height=3000;$Host.UI.RawUI.BufferSize=$B;
|
||||||
if (!$Pass.IsPresent) {clear;}
|
if (!$Pass.IsPresent) {clear;}
|
||||||
|
@ -140,23 +140,6 @@ $Admin = ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdenti
|
|||||||
$line2 = "============================================================"
|
$line2 = "============================================================"
|
||||||
$line3 = "____________________________________________________________"
|
$line3 = "____________________________________________________________"
|
||||||
|
|
||||||
function UnQuickEdit
|
|
||||||
{
|
|
||||||
$t=[AppDomain]::CurrentDomain.DefineDynamicAssembly((Get-Random), 1).DefineDynamicModule((Get-Random), $False).DefineType((Get-Random))
|
|
||||||
$t.DefinePInvokeMethod('GetStdHandle', 'kernel32.dll', 22, 1, [IntPtr], @([Int32]), 1, 3).SetImplementationFlags(128)
|
|
||||||
$t.DefinePInvokeMethod('SetConsoleMode', 'kernel32.dll', 22, 1, [Boolean], @([IntPtr], [Int32]), 1, 3).SetImplementationFlags(128)
|
|
||||||
$t.DefinePInvokeMethod('GetConsoleWindow', 'kernel32.dll', 22, 1, [IntPtr], @(), 1, 3).SetImplementationFlags(128)
|
|
||||||
$t.DefinePInvokeMethod('SendMessageW', 'user32.dll', 22, 1, [IntPtr], @([IntPtr], [UInt32], [IntPtr], [IntPtr]), 1, 3).SetImplementationFlags(128)
|
|
||||||
$k=$t.CreateType()
|
|
||||||
if ($winbuild -GE 17763) {
|
|
||||||
if ($k::SendMessageW($k::GetConsoleWindow(), 127, 0, 0) -EQ [IntPtr]::Zero) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$v=(0x0080, 0x00A0)[!($winbuild -GE 10586)]
|
|
||||||
$b=$k::SetConsoleMode($k::GetStdHandle(-10), $v)
|
|
||||||
}
|
|
||||||
|
|
||||||
function echoWindows
|
function echoWindows
|
||||||
{
|
{
|
||||||
CONOUT "$line2"
|
CONOUT "$line2"
|
||||||
@ -1065,7 +1048,6 @@ function ClicRun
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
$Host.UI.RawUI.WindowTitle = "Check Activation Status"
|
$Host.UI.RawUI.WindowTitle = "Check Activation Status"
|
||||||
UnQuickEdit
|
|
||||||
if ($All.IsPresent) {
|
if ($All.IsPresent) {
|
||||||
$B=$Host.UI.RawUI.BufferSize;$B.Height=3000;$Host.UI.RawUI.BufferSize=$B;
|
$B=$Host.UI.RawUI.BufferSize;$B.Height=3000;$Host.UI.RawUI.BufferSize=$B;
|
||||||
if (!$Pass.IsPresent) {clear;}
|
if (!$Pass.IsPresent) {clear;}
|
||||||
|
Reference in New Issue
Block a user