Jump to content

Running Autoit script on remote computer


Recommended Posts

I created an AutoIt script that opens a setup.exe (for a printer installation), click buttons on the GUI (based on their position), and installs a printer.

I need this process to run remotely. So far I can call the script using PSExec.exe from the server (Window Server 2012) and start it on the remote computer (Windows 8.1) which I can tell is happening because it opens up the setup.exe GUI on the remote machine but the window is completely blacked out and it doesn't proceed with the mouse clicks. I know approximately where the buttons are on the GUI and when I click them I can tell that they are responding so the setup program is definitely running albeit without properly displaying the GUI.

The problem with the script obviously has to do with it not registering the simulated mouse clicks on the buttons in the GUI. I've heard this is a problem when trying to manipulate GUIs remotely. Is there any way to circumvent this?

Link to comment
Share on other sites

  • Developers

When the script runs under remotely with PSEXEC, it actually runs as a service, which means the Send() Mouse*() functions aren't available and you need to use Control*() functions.

Doesn't the installer have a silent mode by using a parameter of /S or /Q?

Jos

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Yeah I  am currently using the -i flag in my psexec command.

I'm not sure if the installer has a silent mode; I'll try to figure that out.

Also I'll look at using the Control*() functions instead of MouseClick().

Thanks guys!

Link to comment
Share on other sites

  • Moderators

Have you looked into whether the printer installation accepts install switches (most major brands do). This would save you altogether the headache of having to manipulate the GUI.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...