Is there a way to interact with a pop-up that requires yes/no answer

Picture of popup

Is there a way to pass through a command to a pop-up box that comes up during an uninstall? The EXE for this does not have any usable command line switches to tell it to be totally silent. I need to be able to get this pop-up box to auto-select No.

1 Like

i also want this question answer

You may have success using the ‘Send-Keys’ toolkit function to try and work around this, I would look for this specific WindowTitle every few seconds using ‘Get-WindowTitle’ in a loop set to timeout after a reasonable amount of time during the uninstallation phase.

1 Like

Hi,

Absolutely. But this is not easy. If its a script then you have to consider the session might be logoff or lock. So in those situation, you will need to avoid sendkeys. I am using Winbatch+compiler to send post action. Those actions are working perfectly on lock session or logoff session.

In some circumstance you may need sendkeys absolutely. In those situations you will need to be sure the script is run while the session is open and test if the session is not lock.

Oh! The user may be tempt to close the window, click by himself, etc… So you will appreciate to lock the mouse and the keyboard When your script is running.

I did it sometimes with winbatch and I have no problem.

Thanks,

I didn’t know about the locked session limitation, this is definitely something to keep in mind. Thanks for the heads up!
Luckily, I’ve so far been able to avoid this situation working with PSADT but I would honestly make sure that I have exhausted every other option before interacting with installer prompts in general as this has the potential to go wrong in so many ways.

The update-grouppolicy function does that. It passes an N to gpupdate.exe so it won’t log off the user. You could try something like this:

cmd /C echo N | setup.exe

Could you try using AutoHotKeys or AutoIt to make a simple exe that clicks “no” on the pop-up, based on the window control property?

https://autohotkey.com/docs/commands/ControlClick.htm
https://www.autoitscript.com/autoit3/docs/functions/ControlClick.htm