4

I am trying to automate installation of an exe file on remote systems. My AutoIt script automates the installation. If I run this script from the system where I need to install, everything works fine.

Problem occurs when I initiate the script from a remote machine. The exe starts but it does not function (wait for the window to appear, then send Enter, etc.). My AutoIt script:

Run("setup.exe")
WinWaitActive("Installation Wizard")
Send("{ENTER}")
WinWaitActive("Installation Wizard")
Sleep(1000)
Send("{TAB}")
Sleep(1000)
Send("data")
Sleep(1000)
Send("{TAB}")
Sleep(1000)
Send("{ENTER}")

I am using the exe generated from the au3 file from a batch file to be run on the remote machine. Batch file:

PsExec.exe \\host -u <user> -p <pass> -i <session id> "<path to batch>\autoitinstall.bat"

Giving the session id as above resolves the issue of window not opening. But once I minimize the RDP window the window becomes inactive. How can I make sure that the setup.exe window is active all the time in the remote system (even if I minimize the RDP window)?

Batch file on remote system:

cd /d <path to the exe generated from au3 file>
start autoitinstall.exe
user4157124
  • 2,809
  • 13
  • 27
  • 42
user145078
  • 241
  • 2
  • 3
  • 8
  • Just came across: http://stackoverflow.com/questions/22956741/capture-screenshot-with-autoit-executed-remotely-via-psexec-results-in-black-rec Trying this solution – user145078 Apr 14 '15 at 09:07

0 Answers0