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

wait for a windows to appear ?

$
0
0

A small vendor gave us some software to install and they did not provide any silent way to install it.  -s, -q, /q, -q, -silent etc... none of those are available.   So I need to automate the installation.  I did this using PowerShell but I need to make my code smarter.   How do I "wait" for a window title to appear?

$wshell = New-Object -ComObject wscript.shell;

$wshell.AppActivate('My Window Title Here')

I use Start-Process to call the .EXE in question and yes I can use sleep 'x' but that is crude.  I want to have my code loop until this window title appears.

 

 

 

 


Viewing all articles
Browse latest Browse all 6937

Trending Articles