Sign in to follow this  
Followers 0
binHEX

Controlling a virtual machine in vmware

2 posts in this topic

#1 ·  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

Share this post


Link to post
Share on other sites



Well, I've had to concede defeat and just run autoit from a bootable cd image inside the VM.

Thanks for the help.

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