Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
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 '09 at 15:52 – Chris Nov 9 '09 at 15:56
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 '09 at 16:03 -- Shut Down Guest is the option that must be used. Followed by – Chris Nov 9 '09 at 16:29
up vote 2 down vote accepted

This should do the trick:

SetTitleMatchMode, Slow
WinWait,,virtual machine is in use,,,
    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

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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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