need help with script to open vmware fusion and logon to windows

I am an AS newbie. I would like to create a script to automate a mundane daily task:

  1. Open VMWare Fusion (this I have achieved :slight_smile: )
  2. Select by bootcamp virtual machine and click run
  3. type my password when prompted and click login
  4. wait a few minutes until windows boots
  5. send ctrl-alt-del command
  6. type username and password then click login

Is this possible?

Send me a license for fusion and I’ll gladly work on it =)

Sorry, I’m a parallels user

It doesn’t look like VMWare Fusion has an Applescript library, unfortunately. Bummer, because I really liked the idea of this.

You might be able to do it with UI scripting, but that could be a little more unstable. Basically, you would need to script the keystrokes you would use to get the results you want after launching VMWare Fusion.

Below is a script I use to launch my bootcamp image upon logon. It also assigns the application in spaces and full screens the VM.

I too am stuck on the request for fusion to authenticate… (replace dls with your user)

set spaces_bindings to {|com.vmware.fusion|:2}

tell application “System Events”
tell expose preferences
tell spaces preferences
set application bindings to spaces_bindings
end tell
end tell
if UI elements enabled then
open “/Users/dls/Library/Application Support/VMware Fusion/Virtual Machines/Boot Camp/%2Fdev%2Fdisk0/Boot Camp partition.vmwarevm”
delay 5
click menu item “Full Screen (Exit Single Window)” of ((process “VMware Fusion”)'s (menu bar 1)'s (menu bar item “View”)'s (menu “View”))
tell application “System Preferences”
set current pane to pane “”
display dialog “UI element scripting is not enabled. Check "Enable access for assistive devices" then rerun script.”
end tell
end if
end tell

You could add a part in your script to turn on the assistive devices:

do shell script "sudo touch /private/var/db/.AccessibilityAPIEnabled" administrator privileges true

Of course that would add another authentication dialog.