binHEX Posted April 16, 2008 Share Posted April 16, 2008 (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 April 16, 2008 by binHEX Link to comment Share on other sites More sharing options...
binHEX Posted April 19, 2008 Author Share Posted April 19, 2008 Well, I've had to concede defeat and just run autoit from a bootable cd image inside the VM. Thanks for the help. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now