7 lines
318 B
PowerShell
7 lines
318 B
PowerShell
#Hiding PS console
|
|
Add-Type -Name win -MemberDefinition '[DllImport("user32.dll")] public static extern bool ShowWindow(int handle, int state);' -Namespace native
|
|
[native.win]::ShowWindow(([System.Diagnostics.Process]::GetCurrentProcess() | Get-Process).MainWindowHandle,0)
|
|
|
|
Start-Sleep -s 5
|
|
Start-Process notepad.exe
|