![]() ![]() The position in the single-quote is the keystroke to send, after the comma is how long you want it to wait before proceeding. The syntax here is this: whatever is in the () is what will be sent. Now start telling it what keys you want to send. I chose 5, but if your machine isn't stressed, 2 is probably enough: Start -Sleep 5 Give it a few seconds to bring that window forward. ![]() ![]() Start the COM: $wshell = New- Object -ComObject wscript.shell īring the uninstallation program with this process ID to the front so we can send it keystrokes: $wshell.AppActivate( $a.id) Let's say your process is called, "Uninstall" and the process is ALREADY RUNNING: $a = Get-Process | ? So, first, get your process ID by setting a variable that contains an array, the data for which is defined by the name of your process. you can't just tell it to click "Next" in an executable because it can't see it. PowerShell isn't going to interact with the prompts. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |