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

force window to be active and on top?

$
0
0

I call an .EXE, I then disable the mouse and keyboard.   The .EXE that is called throws up a dialog window that I try to activate.    This is running from the RUN key in the registry.

$wshell=New-Object-ComObjectwscript.shell;
$wshell.AppActivate('Alaris® desktop configuration tool')

The issue I'm seeing is although the dialog window does appear my script never clicks the "Next" button since for some reason the window does not have focus.    But, if I run this manually it all works.  Being called from the RUN key seems to be the issue that causes the focus problem.

Is there another command that will force a window to be on top and the active window?

 


Viewing all articles
Browse latest Browse all 6937

Trending Articles