Sign in to follow this  
Followers 0
sgardner

Running Autoit script on remote computer

5 posts in this topic

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?

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

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

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

also, have you tried  with the -i parameter of psexec?


small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....

Share this post


Link to post
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!

Share this post


Link to post
Share on other sites

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.


When you're dead, you don't know you're dead - it's only difficult for those that know you. It's the same way when you're stupid...

My Scripts: SCCM UDFInclude Source with Compiled Script, Windows Firewall UDF

Share this post


Link to post
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
Sign in to follow this  
Followers 0