Jump to content

Recommended Posts

Posted (edited)

I have been working to use vbscript and AutoItX to send keystrokes to a guest OS in vmware, but am having some difficulty.

Here is my code:

CODE

Set oAutoIt = CreateObject("AutoItX3.Control")

oAutoIt.ControlFocus "Local host - VMware Server Console","",""

WScript.Sleep 1000

oAutoIt.ControlSend "Local host - VMware Server Console","","","!m"

WScript.Sleep 500

oAutoIt.ControlSend "Local host - VMware Server Console","","","g" 'This grabs the input

WScript.Sleep 500

wscript.Echo oAutoIt.ControlSend("Local host - VMware Server Console","","VMWare.GuestWindow1","password")

WScript.Sleep 500

wscript.Echo oAutoIt.ControlSend ("Local host - VMware Server Console","","VMWare.GuestWindow1","{ENTER}")

Everything returns 1's showing that it is "working", however, nothing ever gets entered into the guest OS.

What am i doing wrong?

Edited by binHEX

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
×
×
  • Create New...