Stop console windows stealing focus

Fixed a Windows issue where the agent's process detection scans repeatedly opened and closed console windows that interrupted users by stealing keyboard focus. The fix hides these temporary windows during the scans, along with tests to prevent regression.