Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources: Active Threads
Viewing all articles
Browse latest Browse all 8411

PowerShell Start-Process without taking focus

$
0
0

Earlier this week I had a need to start a process from PowerShell and ensure that it did not take focus.  This doesn’t seem to be supported by the Start-Process cmdlet or any other mechanism built into PowerShell, so I quickly built this script to call into CreateProcess with SW_SHOWNOACTIVATE.  With the below function a process can be started without it stealing focus, though it will appear on top of the z-order.

Read More


Viewing all articles
Browse latest Browse all 8411

Trending Articles