vote up 0 vote down star

So my situation is that I am running VMware workstation to run a LAMP server for some lightweight data collection. My host OS is Windows XP. I have a APC UPS that is set to shut down the PC via PowerChute if a power outage hits.
What I am wondering is if there is some way to gracefully shut down the LAMP server because I am pretty sure that VMware will keep PowerChute from shutting down the PC if there is a VMware appliance running.

flag
Can you show me an example of the window that pops up when the PC is trying to shut down (The vmware one). IIRC it says something like virtual machine still in use but I need the exact text and I can make you an autohotkey script to close the virtual machine properly. – John T Nov 9 at 15:52
Ah, thanks! Gonna need the file menu and shutdown dialog too (power off machine, send shutdown signal...) sorry for the hassle! – John T Nov 9 at 16:03
i35.tinypic.com/2rmo9co.jpg -- Shut Down Guest is the option that must be used. Followed by i33.tinypic.com/snmpog.jpg – Chris Nov 9 at 16:29

1 Answer

vote up 2 vote down check

This should do the trick:

#Persistent
SetTitleMatchMode, Slow
WinWait,,virtual machine is in use,,,
{
    WinMaximize
    Send { Enter }
    Send { Alt } 
    Send { Right 3 }
    Send { Down }
    Send { Right }
    Send { Down 5 }
    Send { Enter }
    Sleep 5000
    Send { Enter }
}

You'll need to install AutoHotkey

link|flag
You are amazing. thank you! – Chris Nov 9 at 21:58
It worked first try? Even I'm surprised. You're very welcome :) – John T Nov 9 at 23:32

Your Answer

Get an OpenID
or
never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.