绕一下- #@&cls&powershell "type '%~0'|out-string|iex"&pause&exit
- [console]::BufferHeight=[console]::WindowHeight
- [console]::BufferWidth=[console]::WindowWidth
- [console]::BackgroundColor=0xf
- [console]::ForegroundColor=0x0
- Add-Type -Ty @'
- using System.Runtime.InteropServices;
- public static class WinApi{
- [DllImport("kernel32.dll")] public static extern uint GetConsoleWindow();
- [DllImport("User32.dll")] public static extern int SetWindowLong(uint hWnd,int nIndex,int dwNewLong);
- [DllImport("User32.dll")] public static extern bool SetWindowPos(uint hWnd,uint hAfter,uint x,uint y,uint cx,uint cy,uint flags);
- }
- '@
- $a=[WinApi]::GetConsoleWindow()
- [void][WinApi]::SetWindowLong($a, -16, 369164288)
- [WinApi]::SetWindowPos($a,0,0,0,0,0,0x0087)
- [WinApi]::SetWindowPos($a,0,0,0,0,0,0x0047)
- cls
复制代码
|