Created
September 2, 2015 12:45
-
-
Save DBremen/54403d02c24e303cb5f1 to your computer and use it in GitHub Desktop.
Example on how to wait for a window to appear for an executable initiated from PowerShell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$regeditInstance = [Diagnostics.Process]::Start("regedit","-m") | |
#wait the regedit window to appear | |
while ($regeditInstance.MainWindowHandle -eq 0){ | |
sleep -Milliseconds 100 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment