VMware Tools Help : VMware Tools Control Panel : Using VMware Tools Scripts

Using VMware Tools Scripts
You can use scripts to automate guest operating system operations when you change the power state of a virtual machine.