edwick

AutoIt and Virtual Machines?

3 posts in this topic

Does anyone here have experience using AutoIt on virtual Windows machines like in VirtualBox or Cloudify? I'm trying to write some AutoIt scripts but even the basic WinZip tutorial .au3 does not work on either a Windows 10 VM in VirtualBox (running over MacOS X) or on a Windows Server 2012 VM running on Cloudify/OpenStack. The Run("winzip90.exe") command works and launches the installer, but nothing I've tried to click the "Setup" button does anything. I've tried using "Send()" as documented in the tutorial, "ControlClick()", and even "MouseClick()" with coordinates but none of them seem to be clicking the button and making the install proceed.

I've found some posts here that refer to using AutoIt on AWS and VMware, so I suspect there might just be something I'd need to configure somewhere, though I can't figure out what it would be.

Share this post


Link to post
Share on other sites



I've run plenty of scripts on VirtualBox and VMware, though never on Cloudify. You are talking about running the script inside the VM, not from the host trying to control the VM, right?

1 person likes this

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

@edwick I have been successfully using VirtualBox to demo my scripts, they work just as well in VMs ;). If your setup was normal, everything should go fine!


Spoiler

My contributions to the AutoIt Community

Some messages & Apologizes:

If I hurt you, Please accept my apologies, I never (regardless of the situation) mean to hurt anybody!!!

Also, I am very busy with my project so I will appear in the last row of the online list, if you want to contact me: Email@TheDcoder.xyz

Or you can have a nice chat with me in freenode, I use the same nick on freenode too!

3fHNZJ.gif

PLEASE JOIN ##AutoIt AND HELP THE IRC AUTOIT COMMUNITY!

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

  • Similar Content

    • Trong
    • cu0x
      _WinAPI_GetKeyboardLayout returns 0 by Windows Server 2012
      By cu0x
      I´m trying to get the Keyboard language and get als return "0" wenn I do it under Windows Server 2012, I executed also in Windows 7 x64 and works fine :S
      Any suggestion? Appreciate it!
      Here my code:
      #include <WinAPISys.au3> Run("cmd.exe", "", @SW_HIDE) Local $hWnd = WinWait("[CLASS:ConsoleWindowClass]") Local $bNewKey = "0" & StringRight(_WinAPI_GetKeyboardLayout($hWnd), 3) MsgBox(0,"Keyboard Language", $bNewKey)  
       
       
       
    • adrigalilea
      Controlsend and virtual machine
      By adrigalilea
      Hi, im able to send or click on a vmware virtual machine, example:
      WinActivate("[TITLE:M1 - VMware Workstation]", "") MouseClick("Right",233, 979) Sleep(100) Send("x") But when it comes to controlclick, or controlsend nothing happens:
      Autoit window info: >>>> Window <<<< Title: M1 - VMware Workstation Class: VMUIFrame Position: -8, -8 Size: 1936, 1056 Style: 0x17CF0000 ExStyle: 0x00000100 Handle: 0x00000000000306D0 >>>> Control <<<< Class: MKSEmbedded Instance: 4 ClassnameNN: MKSEmbedded3 Name: Advanced (Class): [CLASS:MKSEmbedded; INSTANCE:4] ID: Text: MKSWindow#0 Position: 202, 94 Size: 1699, 884 ControlClick Coords: 456, 374 Style: 0x50000000 ExStyle: 0x00000000 Handle: 0x00000000000E0AC0 Tested controlclick and controlsend code:
        WinActivate("[TITLE:M1 - VMware Workstation]", "") $tempo = ControlSend("M1 - VMware Workstation", "","","ic") $tempo = ControlClick("M1 - VMware Workstation", "","","left",1,456, 374) $tempo = ControlSend("[CLASS:MKSEmbedded; INSTANCE:4]", "MKSWindow#0","","x") $tempo = ControlSend("[CLASS:VMUIFrame]", "","","x") Thank you.
      EDIT: Tested sending something to VMWare and it worked, but when it comes to the actual virtual machine it keeps doing nothing.
      Tested code to send alt+h to vmware, not working when i try it with the virtual machine.
      $tempo = ControlSend("M1 - VMware Workstation", "","","!H") Ok, all control send are giving me a 0 as output wich means "Returns 0 if window/control is not found.", except the one thats being sent to VMWare software, wich gives me a 1, anyone able to help? :S
    • goss34
      Embed VM In GUI
      By goss34
      Hi Guys,

      I was wondering if anyone had created a GUI with an embedded Virtual Machine? For those that do not use Virtual Centre you can access Virtual Machines via Internet Explorer and the VM loads in the IE window.

      I would imagine its possible using:
      ObjCreate
      GUICtrlCreateObj

      Does anyone happen to have an example of how this could be done?

      Thank you