Hello All,
I have this bit of code that opens a self made application and presses return.
I want to then close the application but I cannot get it to close. This is my code. Anyone help? Thanks.
[pre]
C:\Users\App.exe
$wshell = New-Object -ComObject wscript.shell;
Sleep 3
$wshell.SendKeys(‘~’)
$wshell.closemainwindow
[/pre]