Jump to content
Sign in to follow this  
Piotr_Hodl

Run autoit script on remote virtual machine (using RDP like azure)

Recommended Posts

Hi guys,

 

My post is more architecture related than the actual autoit script.

Currently I have a java tool that makes a connection to a azure Windows VM using WINRM.

Then I "grep" the session ID of RDP and using psexec I execute my autoit script on the session ID of the RDP (This assumes that I need to have already a RDP connection established).

The script runs perfectly when I have a RDP session maximized/opened. If I minimize the RDP window some commands do not work, as for example the Send command.

I do understand that it has to do with the window not being active, even though the script is executed remotely.

https://www.autoitscript.com/wiki/FAQ#Why_doesn.27t_my_script_work_on_a_locked_workstation.3F

 

My goal is to be able to run the autoit scripts with no limitations, like I was running in my local machine.

 

One important thing, all the flow is being triggered from a linux machine with no GUI. So that is why, I am using a jar file to start the winrm connection.

 

So to sum up:

starting server: centos with no GUI

remote server: azure win 10

goal: from starting server, launch autoit script that is on remote server

 

Thanks

Piotr

 

 

 

Edited by Piotr_Hodl

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  

  • Similar Content

    • By argumentum
      About This File
      I use RDP a lot, and is not uncommon to run another session again, closing the prior connection that was minimized.
      The solution:  See if the window exists. If it does, restore it, else, run it.  
      And this is the support topic for RdpRunner.
      so, if you need help with this, this is the place  
      The only question that come to mind is: What is a RDP file ?, and that, is better answered by searching https://www.google.com/search?q=rdp+file
       
    • By argumentum
      I use RDP a lot, and is not uncommon to run another session again, closing the prior connection, when minimized.
      The solution?, see if the window exists. If it does, restore it, else, run it.
    • By Colduction
      Hello Guys and AutoIt Scriptwriters!🎉❤️
      I've created a script to notify to me if RDP main IP changed then send a message via Telegram bot to me
      But some of my RDP's Main IP are @IPAddress1 or @IPAddress3 or Public IP Address...
      I want to detect automatically the IP that windows client can run RDP to remotely control
      This image can help you that what i say, there are three RDP with specified IP, i want to run script in these RDP's then capture those IP's changes then notify me via Telegram bot

    • By argumentum
      ..so I have to help someone and remember how to get the session ID,
      then remember how to shadow. All from a command prompt. Not cool.
      So I wrote this,
      Is coded for Windows in English. May work in other languages too.
      ( as long as "qwinsta" runs, this should work ) It now calls wtsapi32.dll
      For this to work as intended, uncheck "noPrompt", or make the changes
       to the group policy, only if you know what you are doing.
      ( I will not aid anyone on how what, as I'm not qualified )
      This is for when all works as you wish, but have to use the
       command line to shadow a user ( and everyone is in a hurry ).
      This gives you a list of users to just click to help the
      user on a remote session, by guiding them ( view ) or
      interacting with the desktop ( control ).
      I do not advise to change anything on your system, nor to use this,
      but if you find it useful, then, it is a very practical utility.
        I did not post in the examples forum as is not an example worth posting.
        It grabs the text out of qwinsta Calls wtsapi32.dll and runs mstsc. Not a noteworthy example.
    • By WoodGrain
      Hi guys,
       
      I've written a script that will move my mouse to a location on the screen whenever my remote access software becomes active, the problem I have is that as soon as the remote access software becomes active it appears to capture the mouse and keyboard so nothing happens when I use MouseMove().
       
      Is there any way around this?
       
      Thanks!
×
×
  • Create New...