Enter text into text box on app software dialogue box.

Hello,

I’m just getting started with coding and was wondering if there was a powershell command that will allow me to enter text and specify the directory into an input box for an apps dialogue box. I was able to get through the buttons in the first 2 pages with the below command.

start-process “D:\Application\Install.exe”
$WindowHandle = Get-Process | Where-Object { $_.MainWindowTitle -Match $WindowTitle } | Select-Object -ExpandProperty MainWindowHandle

[void][System.Reflection.Assembly]::LoadWithPartialName(‘System.Windows.Forms’)
[System.Windows.Forms.SendKeys]::SendWait("{ENTER}")
[System.Windows.Forms.SendKeys]::SendWait("{ENTER}")

 

Installers traditionally have silent install capabilities so that you do not need to attempt to interface with popup dialog(s). Trying to activate windows and use send keys is the absolute last ditch effort and typically has many issues. I would recommend searching for “my software installer silent install” as typically there will be forums and solutions to make the installer automatically answer the prompts without required user interaction.

Hi Rob,

Thanks for getting back to me. I was able to get the appliction installed correctly with the silent install, but this application has a form to create a workspace on the data drive and I would like to also atuomate that part of the application. Do you know of anyway that I can sendkeys or is there another command that I can use to fill in the input boxes with text?

Thanks in advance,

You may contact the author/vendor of that application. Automated interactions with GUI elements are usually unreliable and error prone. If you’re lucky there is an API or config file or registry setting you can use to set up the initial configuration.

In some cases, you can get usage for the install as in “install.exe /?”

This “should” return any available options to the installer.