

#Macos used runonly applescripts avoid for code#
Here is a sample script you can use with a BootCamp Partition (the code begins after *****). Make sure you save a writable copy for yourself beforehand. In regards to the program itself, you can prevent users from altering your AppleScript program or viewing its commands by using the "Run Only" option when you save your AppleScript as a Program using Script Editor. You can add the AppleScript program you write to the user's "Login Items" under the Accounts section of System Preferences. You have seen part of this solution from my previous post. Because of this administrator "problem", I decided to create a workaround by writing an AppleScript program. The resulting program from AppleScript can then be added to your OS X Account as a Login Item.Įtung is correct on both issues. When the user quits VMWare Fusion, the Boot Camp partition will be mounted again.ĪppleScript "saved as" a program using Script Editor:ĭo shell script "sudo diskutil unmount /dev/disk0s3" password "SUPERSECRET" with administrator privilegesĭo shell script "sudo \"/Applications/VMWare Fusion.app/Contents/MacOS/vmware\" \"/Users/aaron/Library/Application Support/VMware Fusion/Virtual Machines/Boot Camp/%2Fdev%2Fdisk0/Boot Camp partition.vmwarevm\"" password "SUPERSECRET" with administrator privilegesĭo shell script "sudo diskutil Mount /dev/disk0s3" password "SUPERSECRET" with administrator privileges Before VMWare Fusion runs, the Boot Camp partition must be unmounted.

Windows 2003 Server is installed on a Boot Camp partition. I wrote a script for the following scenario: A Mac must automatically start the Windows 2003 Server virtual machine upon booting OS X 10.4. It is possible to start the Virtual Machine automatically.
